jQuery File Uploads with cURL - SOLVED -


this pretty unorthodox use case, wondering if it's possible.

i have file upload page uses blueimp's jquery file upload (angular js), , it's great. recently, asked if send files upload site directly cli, if he's ssh'd machine. realize there thousand other ways files, neat if pass through upload site.

the lead can think of use curl, i'm not familiar it.

here's i've been trying far:

curl --data "files[]=/tmp/mytestfile.txt" https://myuploadsite.com

but prints page contents.

if method work, don't know how trigger blueimp's submit button. he's not using form action trigger file upload. familiar jquery file upload point me in right direction? in advance.

edit: ended figuring out. couldn't find easy way programmatically interface blueimp's form, ended making separate php file hidden form on had basic fields. web users can use blueimp form, , cli users can use basic one, since both go same uploads directory.

to upload basic form, have been using "curl -f" instead of "curl --data".

curl -f "file=@<path file>" -f "folder=<description>

the php file handles description part, , other fields want use.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -