Reputation: 190
I've been using Filepicker.IO in order to upload files directly from the browser to the amazon s3 and most things are working fine, the only problem i'm facing now is that after the upload is done, i'm not getting the name of the file in the s3.
Filepicker js api is returning this object:
Object {url: "https://www.filepicker.io/api/file/xxxxxxxxxxxxx", filename: "xyzhi.mp4", mimetype: "video/mp4", size: 36735, isWriteable: true}
Usually this object comes with a property named 'key' which has the name of the file in the S3.
This happens when the upload is not done from the local computer, if i pick a local file everything works ok, but if i pick a file from any of the providers (e.g Dropbox, Google Drive), i can't get the filename in the S3 server.
Thanks.
Upvotes: 1
Views: 851
Reputation: 2381
You should make sure that you are using a function that is explicitly storing to S3, for instance filepicker.pickAndStore
or filepicker.store
. As noted in the filepicker.io pick API documentation, the "key" parameter on fpfiles returned specifically from the .pick() call are deprecated and not meant to be used.
Upvotes: 1