TheWaWaR / simple-http-server

Simple http server in Rust (Windows/Mac/Linux)
MIT License
2.63k stars 175 forks source link

Can you give an example on how to upload using the API? #73

Closed mindtricksdev closed 1 year ago

sysbite commented 1 year ago

Better late than never.

Have a curl sample: curl -X POST -F "csrf=your_token" -F "files=@yourfile.ext;filename=path_to_root/yourfile.ext" http://yourip:yourport/save_files_endpoint

TheWaWaR commented 1 year ago

And you can get the csrf token from the startup output, some thing like this:

Upload: enabled, CSRF Token: *******