store files to filepicker.io from the command line

2019-06-03 22:49发布

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条回答
贪生不怕死
2楼-- · 2019-06-03 23:26

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

查看更多
登录 后发表回答