在 ios 上上传图像时,反应本机应用程序崩溃且没有日志
当我尝试在 android 上使用 firebase uploadBytes 时,它工作正常,但在 ios 上,每当视频文件大于 2 mb 时,应用程序就会崩溃,没有日志 我尝试使用 uploadBytesResumable 甚至尝试将我的 firebase 版本降级到版本 8 但还没有解决方案
const fetchImage = await fetch(localUri);
const imageBlob = await fetchImage.blob();
const storage = getStorage();
const upload = ref(storage, 'path_to_sotrage');
const uploadTask = await uploadBytesResumable(upload, imageBlob);
return await getDownloadURL(uploadTask.ref);
when i try to use firebase uploadBytes on android it works fin but on ios whenever the video file is bigger than 2 mb the application crashes with no logs
i tried using uploadBytesResumable and even tried to downgrade my firebase version to version 8 and no solution yet
const fetchImage = await fetch(localUri);
const imageBlob = await fetchImage.blob();
const storage = getStorage();
const upload = ref(storage, 'path_to_sotrage');
const uploadTask = await uploadBytesResumable(upload, imageBlob);
return await getDownloadURL(uploadTask.ref);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个
uploadBytes
对我来说崩溃了,我不明白为什么。但是,文档中的uploadBytesResumable
模式是工作并且看起来更稳定。希望有帮助。This
uploadBytes
crashes for me and I couldn't figure out why. However,uploadBytesResumable
pattern from documentation is working and seems more stable. Hope it helps.