问题
I have a bunch of files, I'd like to push them all to filepicker and use various convert options to manipulate them.
How do I automate this process? Is there a way to do this outside of javascript with a traditional scripting language I can run from the command line?
回答1:
The way to do this is as a POST to /api/store/S3 with the contents of the file. For instance
curl -F fileUpload=@test.html 'https://www.filepicker.io/api/store/S3?key={{apikey}}&filename=myCoolFile.html'
There are other tools that perform similar actions, such as https://github.com/uams/geturl, but the mechanism they use (posting to /api/path/storage) is out of date.
Overall, you can use this functionality, but the urls may change. We're fairly happy with the /api/store/[provider] syntax, but may change before release
来源:https://stackoverflow.com/questions/14115280/store-files-to-filepicker-io-from-the-command-line