dimanche 7 février 2016

Laravel select file upload from cloud providers like Dropbox, S3, Rackspace

In Laravel you can use the Flysystem drivers to work with local filesystems, Amazon S3, and Rackspace Cloud Storage.

A normal file upload input field defaults to opening a window for the user to select a file from their own local machine. And then my app would save that file to some local storage or cloud storage using the Flysystem driver.

If I want to allow the user to select the file they wish to upload from their own cloud providers like Dropbox, Google Drive, Amazon S3 or Rackspace, how would you go about doing this.

So lets say I could have a modal that pops up with 4 buttons the user can choose from e.g. 'Your computer', 'Amazon S3', 'Rackspace', 'Drop Box'.

If they click on 'Your computer' then the normal file input field is shown from which the user can browse a file on their own computer to upload.

If they click the other 3 buttons then they should be directed to the relvant cloud storage where they would login and select the file they wish to upload. Now heres is the tricky bit, how would you wire this up i.e upload the file the user selected to your app?

Basically I'm trying to figure out how you would create some kind of file chooser similar to filepicker or kloudless that allows you to select the file you wish to upload from various cloud storage and then upload that to your own applications storage system.

Some advise and tips would be much appreciated.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire