stonith404 / pingvin-share

A self-hosted file sharing platform that combines lightness and beauty, perfect for seamless and efficient file sharing.
BSD 2-Clause "Simplified" License
2.44k stars 180 forks source link

🚀 Feature: Upload files with CURL #314

Open maetthew opened 8 months ago

maetthew commented 8 months ago

🔖 Feature description

Would be cool to have the ability to be able to upload files with CURL and just have the generated URL be returned.

Allow unauthenticated if unauthenticated shares are enabled, or authenticated through a token connected to your account.

🎤 Pitch

Be able to easily upload files through the terminal, integrate into scripts etc.. The sky's the limit!

tdompierre commented 5 months ago

It's actually already possible, though not documented. There are a couple of gotchas, and it might break when the new features come in, but at this time I have a working script to upload files.

If you need a clearer example of this, you can upload a file using the frontend and inspect the network calls. Hope this helps!

MrZell commented 2 months ago

I am also looking to upload files through the terminal via CURL. Been looking for a simple, easy to setup, lightweight app that can accept files from CURL without any authentication. Seems to be a bigger ask than I would have figured though Pingvin seems to be the closest thus far!

@tdompierre Since you've gotten CURL to work with Pingvin, I'm hoping you can provide some insight. I am not a developer so forgive me for my ignorance. I have no idea how to even begin with inspecting the network calls between the frontend and backend. I have Pingvin running in a Docker container on UnRAID. I just setup Netdata in another docker container and hope that I can use that for inspecting the network traffic.

Are there any tools or procedures you can recommend for inspecting the traffic between the frontend and backend? Things to look out for?