是否可以执行以下操作?
- 通过给它一个 URL 将图像上传到 Filepicker.io
- 通过 cURL 完成
我在文档中找不到提到其中任何一个的地方
是的,这是可能的:
>>> 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上的完整文档