Multi upload in Android SDK.
How can I do multi uploads directlly in Android SDK? Today I upload one at time that way:
for (File file: fileList) {
map = this.cloudinary.uploader().upload(file, param);
}
Can I send the list?
-
Uploading multiple images is not directly supported by our SDK at the moment. Supporting such a workflow can be done by using multithreading, initiating an upload request for every thread separately.
Note that in the event of a failure an exception will occur. These can be debugged based on the error message that is sent along with the exception. -
Ok, I was really thinking about using multithread.
Another question: I don't really understand how the upload is made, I mean, when I call "cloudinary.uploader().upload(file, options);" he does the uploads asyncronally, ok? But I don't control this upload at all, so how can I get a exception in case of failure? In what moment this exception is throwed?
-
When calling the upload method, it will return the result as soon as it has completed. If an exception occurs while the method is running, it can be caught by your code. Please see the following page for some examples of handling exceptions when calling the Cloudinary Java SDK methods:
Post is closed for comments.
Comments
4 comments