Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

306
Vistas
Error NS_BINDING_ABORTED una vez que el servidor maneja la solicitud de opciones

Tengo una ruta HTTP simple que no es específica del método. La solicitud de OPTIONS para CORS devuelve un 200, no hay problema. Estoy esperando el POST posterior, pero Firefox/Safari arroja un error con un NS_BINDING_ERROR .

ingrese la descripción de la imagen aquí

Como resultado, la solicitud real nunca se satisface. ¿Por qué sucedería esto? Estoy enviando un XMLHTTPRequest desde el cliente así:

 function chunkUploader(chunkForm, startChunk, file) { var oReq = new XMLHttpRequest(); oReq.timeout = 2000 oReq.open("POST", "http://localhost:8300/upload", true); oReq.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); oReq.setRequestHeader('Content-Type', 'multipart/form-data'); oReq.onload = function (oEvent) { const updatedStartChunk = startChunk + CHUNK_SIZE; if (updatedStartChunk < file.size) { fileChunker(file, updatedStartChunk); return } }; console.log(chunkForm.get("file")) oReq.send(chunkForm); }

Retazo

 func uploadHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Access-Control-Allow-Origin", "*") w.Header().Set("Access-Control-Allow-Headers", "*") w.Header().Set("Access-Control-Allow-Methods", "*") if r.Method == "OPTIONS" { w.WriteHeader(http.StatusOK) return } if err := r.ParseMultipartForm(0); err != nil { fmt.Fprintf(w, "Err parsing form.") } f, _, err := r.FormFile("file") if err != nil { fmt.Fprintf(w, "Err parsing file.") } defer f.Close() fmt.Println(f) .....
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda