Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

288
Views
¿Por qué aparece el error 413 al cargar una imagen con la 'cámara expo ImagePicker'?

Si tomo una foto con la cámara, aparece este error: Error: la solicitud falló con el código de estado 413.

Pero si selecciono y subo una foto de la galería del teléfono, no habrá problema. El tamaño de la foto que subo estaba por debajo de los 5mb tanto con la cámara como con la galería.

 const formData = new FormData(); let localUri = image.value.uri; let filename = localUri.split('/').pop(); let type = mime.getType(localUri); image.blob && formData.append('photo', { uri: localUri, name: filename, type }); const pickImageFromGallery = async () => { let result = await ImagePicker.launchImageLibraryAsync({ mediaTypes: ImagePicker.MediaTypeOptions.Images, allowsEditing: true, aspect: [16, 9], base64: true, }); if (!result.cancelled) { const response = await fetch(result.uri); const blob = await response.blob(); if (blob.size && blob.size / 1024 < 5120) { setImage({ value: result, blob: blob, error: false, }); } else { alert('File size is too large. Please upload files below 5MB!'); } } }; const pickImageFromCamera = async () => { let result = await ImagePicker.launchCameraAsync({ mediaTypes: ImagePicker.MediaTypeOptions.Images, allowsEditing: true, aspect: [16, 9], base64: true, }); if (!result.cancelled) { const response = await fetch(result.uri); const blob = await response.blob(); if (blob.size && blob.size / 1024 < 5120) { setImage({ value: result, blob: blob, error: false, }); } else { alert('File size is too large. Please upload files below 5MB!'); } } };
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!