我正在开发一个应用程序,我正在尝试将优质的多个图像上传到服务器,我遵循的方法是:
1. Selecting N images on the iOS app
2. I inform server about the N images, inturn server creates N urls in amazon and return it to iOS app
3. I do a PUT call to upload images one by one to amazon from iOS app.
4. After uploading N images, I make a call to server with all the successful uploads URL.
这种同步方法的问题在于它涉及N + 2次呼叫(不包括所有失败上传的重试),并且如果有多个图像,则需要花费大量时间。还
你能指导我采用高效的方法并行上传多张图片,以便节省像whatsapp 多张图片上传的时间吗? 感谢。