如何使用file picker.io传递文件到php


How to pass file to php using file picker.io

我将很高兴找到如何通过post方法传递一个mp3文件到php使用file picker.io

是的,这是可能的:

>>> 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

我认为当你使用日期选择器。选择的文件将自动存储在datepicker服务器中。然后,您可以从公共url读取文件(API在响应中提供公共url)并存储它(例如使用CURL ?)