Filepicker.io - 通过URL和cURL上传

时间:2013-03-19 18:13:45

标签: curl filepicker.io

可以执行以下操作吗?

  1. 通过提供网址
  2. 将图片上传到Filepicker.io
  3. 通过cURL
  4. 进行

    我在文档中找不到其中任何一个

1 个答案:

答案 0 :(得分:1)

是的,这是可能的:

>>> curl -X POST -F fileUpload=@filename.txt https://www.filepicker.io/api/store/S3?key=MY_API_KEY
{"url": "https://www.filepicker.io/api/file/WmFxB2aSe20SGT2kzSsr", "size": 234, "type": "text/plain", "filename": "tester.txt", "key": "1ilWxmaRRqhMd2vSbSyB_tester.txt"}

>>> curl -X POST -d url="https://www.filepicker.io/static/img/watermark.png" https://www.filepicker.io/api/store/S3?key=MY_API_KEY
{"url": "https://www.filepicker.io/api/file/N49i6hPRBeropWnCWOLw", "size": 8331, "type": "image/png", "filename": "watermark.png", "key": "a1RyBxiglW92bS2SRmqM_watermark.png"}

https://developers.filepicker.io/docs/web/#fpurl-store

的完整文档