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

171
Views
Reacciona la imagen de carga de la exposición nativa con la cámara o la aplicación del selector de imágenes se bloquea

Estoy tratando de cargar una imagen con Expo React Native en iOS 15, así que cuando tomo una foto o elijo una imagen de la galería, las aplicaciones se bloquean al 25% de la carga.

Cuando descargo una imagen de mala calidad de Google, la aplicación carga una imagen muy rápido sin bloquearse.

Creo que el problema está en el tamaño de la imagen.

Mi código de carga :

 const savePost = async() => { if(!image) return; const path = `posts/${auth.currentUser.uid}/${Math.random().toString(36)}`; const response = await fetch(image); const blob = await response.blob(); // Upload file and metadata to the object 'images/mountains.jpg' const storageRef = ref(storage, path); const uploadTask = uploadBytesResumable(storageRef, blob); // Listen for state changes, errors, and completion of the upload. uploadTask.on('state_changed', (snapshot) => { // Get task progress, including the number of bytes uploaded and the total number of bytes to be uploaded const progress = Math.round((snapshot.bytesTransferred / snapshot.totalBytes) * 100); setprog(progress); switch (snapshot.state) { case 'paused': console.log('Upload is paused'); break; case 'running': console.log('Upload is running'); break; } }, (error) => { // A full list of error codes is available at // https://firebase.google.com/docs/storage/web/handle-errors switch (error.code) { case 'storage/unauthorized': // User doesn't have permission to access the object console.log("// User doesn't have permission to access the object"); break; case 'storage/canceled': // User canceled the upload console.log("// User canceled the upload"); break; // ... case 'storage/unknown': // Unknown error occurred, inspect error.serverResponse console.log("// Unknown error occurred, inspect error.serverResponse"); break; } }, () => { // Upload completed successfully, now we can get the download URL getDownloadURL(uploadTask.snapshot.ref).then((downloadURL) => { console.log('File available at', downloadURL); }); } ); }
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!