Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is so cool! I really like your project. Its so simple and powerful and very succinct. Do you have an example for the "Poor man's file sharing"? I tried doing the simple thing:

> curl -F 'data=@test.txt' https://patchbay.pub/test.txt

And on the other computer:

> curl https://patchbay.pub/test.txt

But I'm seeing that the output is being wrapped with "Content-Disposition" and "Content-Type" at the top. I'm no HTTP expert, but is there a way to use your server (or namely, curl) to transfer the file so that it doesn't wrap this info?



Change the command on the sending computer to

    curl -X POST --data-binary "@test.txt" https://patchbay.pub/test.txt
The command on the other computer remains the same as what you had

    curl https://patchbay.pub/test.txt


Thanks!


Also want to mention that in general you can add mime=whatever on the consumer side to override the Content-Type the server uses. I haven't set anything up for Content-Disposition yet, so that's going to be whatever golang defaults to for the file extension. Feel free to open an issue if you'd like specific behavior




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: