Allow pushing files via POST
Im trying to push files via busybox wget (curl is not available), this thing does not know PUT, but has --post-data / --post-file parameters, .. but im always getting 405 not allowed. Thanks!
i hope #666 is not an evil request.
@carl-unique POST requests have to be made to / (https://github.com/dutchcoders/transfer.sh/blob/main/server/server.go#L527)
i tried to do:
wget -S --post-file /tmp/testfile.txt https://transfer.my.server/
or
wget -S --post-file /tmp/testfile.txt https://transfer.my.server
but got
> HTTP/1.1 500 Internal Server Error
on server i got:
[transfer.sh]2026/02/09 20:44:12 request Content-Type isn't multipart/form-data
[transfer.sh]2026/02/09 20:44:12 10.11.12.13:0 - - [2026-02-09T20:44:12Z] "POST / HTTP/1.1" 500 "" "Wget"
@carl-unique it's written in the server logs: "request Content-Type isn't multipart/form-data", you must send a multipart/form-data request for POST, check on wget manual how to do it :)
i think the busybox image (which only knows wget) is not able to send multipart/form-data. I can help myself by just re-building the images and add curl, but it seems there are a few very minimum images out there which do not support this out of the box. Thanks anyway for pointing me to the right hint. :) Thanks!
@carl-unique why do you make a request from a docker image? if the image you run transfer.sh from (assuming you do that) is reachable on the network (whatever public or private) you can just use curl from your shell. also do you mount in the busybox image the file you want to upload? it seems to me just a little strange workflow :)
im using postgres:17-alpine .. i wanted to make a database snapshot and send it to transfer.sh internally to be able to move it to another install, .. so i most probably will just use another postgres image which has curl. no problem. :)