uploadcare / uploadcare-ruby

Ruby API client that handles uploads and further operations with files by wrapping Uploadcare Upload and REST APIs.
https://uploadcare.com
MIT License
39 stars 28 forks source link

Bulk upload files via upload_files method in Uploadcare::Api is returning files out of order. #65

Closed solidiquis closed 2 years ago

solidiquis commented 3 years ago

I have a PDF that I'm chopping up into jpegs on my backend, which I then upload in bulk to Uploadcare, but noticed that I'm receiving the images back out of order.

I can sort the images back on my end because I've named them 0.jpg, 1.jpg, etc., however, the Uploadcare::Api::File object that I get in return doesn't contain the name of the original image unless I get that information via the load_data method, which requires me to make multiple round trips to the Uploadcare API for each image, which isn't ideal.

Any suggestions on how I can upload in bulk to preserve the order, or at least get the name of the original file that in the file object that gets returned from uploadcare?

optlsnd commented 3 years ago

Hi @solidiquis, which method are you using for uploading multiple files? Can you share an example of your upload request and the response you get back from the API?