Leah Collins
Leah Collins

Reputation: 637

Filepicker upload from url

I just started using filepicker for my app. It works fine. I have a huge list of uploaded files on the server. I want to upload few files to filepicker. What I have done is listed all file urls. Is there any javascript method I can upload the file using the file url.

I appreciate any help.

Thanks.

Upvotes: 0

Views: 892

Answers (2)

brettcvz
brettcvz

Reputation: 2381

You'll want to use the filepicker.storeUrl method: https://developers.filepicker.io/docs/web/#storeUrl

filepicker.storeUrl(
     "https://filepicker_static.s3.amazonaws.com/37e3769/img/landing/cloud.png",
     {filename: 'cloud.png'},
     function(FPFile){
         console.log(JSON.stringify(FPFile));
     }
);

Upvotes: 1

kels
kels

Reputation: 175

Take a look at geturl. It's an opensource project that uploads files to filepicker.io from the command line. If nothing else, you can read the code and copy the relavent parts.

https://github.com/uams/geturl

Upvotes: 0

Related Questions