使用Google Firebase同时上传多张图片

编程入门 行业动态 更新时间:2024-10-19 21:33:42
本文介绍了使用Google Firebase同时上传多张图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在Swift iOS项目中使用Google Firebase。我有我的应用程序的一部分,用户从他们的设备中选择多张照片进行上传。我正在尝试找到将他们一次选择的所有照片上传到Firebase存储的最佳做法。我知道如何上传一张照片。

I'm using Google Firebase in a Swift iOS project. I have a part of my app where the user selects more than 1 photo from their device to upload. I'm trying to find the best practice for uploading all the photos they selected at once to Firebase Storage. I know how to upload one photo.

我查看了文档但没有看到任何关于上传多个NSData对象的方法,所以我只是运行for循环和单独上传每张图片?

I looked through the Docs and didn't see any methods about uploading multiple NSData objects, so would I just run a for loop and upload each image individually?

谢谢!所有反馈都表示赞赏。

Thanks! All feedback is appreciated.

推荐答案

@FrankVanPuffellen在评论中的回答......

Answered by @FrankVanPuffellen in comments...

你的确只是循环并单独上传它们。如果你一次上传一个,你的iOS用户也会很感激,这样他们就可以在中途中止上传而不会丢失所有图像的进度。 - Frank van Puffelen

"You'd indeed just loop and upload them individually. Your iOS user might also appreciate if you upload them one at a time, so that they can abort the upload midways through without losing progress on all images." – Frank van Puffelen

更多推荐

使用Google Firebase同时上传多张图片

本文发布于:2023-11-26 02:51:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1632342.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多张   上传   图片   Google   Firebase

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!