:: krowemoh

Friday | 27 DEC 2024
Posts Links Other About Now

previous
next

A Pastebin Site - Idea

2023-08-09

While messing around with Tiny Core Linux, I needed a way to get some files off the vm and into my host system. I didn't have ssh or scp and I also didn't have a ftp server running. I did however have curl and so I looked around for a file upload site.

I found the perfect one and it's one of those things that I want to make myself as well.

keep.sh

It's a lovely little site that calls itself "A Dead Simply File Upload System, Build for System Administrators". It most definitely was! It had the curl requests to upload and download the files front and center.

I used it to quickly move some files over and it worked without a hitch.

The docs page is a list of curl requests which is great. I am curious about how much they make as the pricing is a bit expensive at 12.99 a month. The free tier is generous and worked for me so hopefully they are doing well.

Documentation

The coolest thing is it crystalized some ideas I have had about creating an upload site. I always wanted to make something like this where you can simply upload a file, get a key and retrieve the file that way. Optimized specifically for the command line as that is when I usually need it.

I think it could be a pretty fun project to do with my BASIC web server and templating engine. It would be relatively straightforward and would be light test of things.

The core pieces are uploading a file and downloading a file. In the middle is some logic to generate random keys and to delete things every 24 hours.

Uploading a file:

curl --upload-file ./your-file.txt https://your-bucket.keep.sh 

Downloading a file:

curl -O https://your-bucket.keep.sh/key/your-file.txt 

In the middle a random key is generated and that is how you get access to your file. There isn't any security outside the fact that guessing the key is going to be quite difficult. You could always upload encrypted files to make sure things stay secure.

There is also logic to delete files on a timer.

This would all be straightforward to implement using my web framework now so I think it would be a fun side project.

It won't be a production thing as these but it could be useful.