Uploading files from terminal on file hosting service, and unlimited cloud storage

Uploading files from terminal on file hosting service, and unlimited cloud storage

In this post I will show you how you can upload files anonymously directly from your terminal, and can have unlimited cloud storage all for free.

BayFiles is a website and file hosting service created by two of the founders of The Pirate Bay. BayFiles works by letting users upload files to its servers and share them online. Users are provided with a link to access their files, which can be shared with anyone on the internet so that they can download the files associated with the particular link. A unique aspect of this file hosting service is that it does not provide a search function for its users or any sort of file directory that could be used to navigate its online file base. BayFiles can be used and accessed by people without requiring them to sign up for it. Source: Wikipedia

Another similar popular service is anonfiles.

Searching for the API

As you can see when you open the anonfiles.com, there is an option of API at the bottom of the page. https://anonfiles.com/docs/api

Understanding the API

The request example under upload in the aforementioned link is: curl -F "file=@test.txt" https://api.anonfiles.com/upload So as we can see in the above command they're using curl. curl is a tool for transferring data from or to a server. We also need to replace test.txt with the name of the file we want to upload.

Installing curl

You can use package manager on the distro of your choice to install curl. For Ubuntu/Debian based distros: sudo apt-get install curl For Arch Linux: sudo pacman -S curl

Many linux distros comes with curl preinstalled. To check the version of curl installed on your system type: curl -V

Uploading files

For demonstration I am going to upload a file named "26bugc.jpg" You would also need to change the current directory to the directory where the file you want to upload is stored. The file I am uploading is stored in my home directory.

Replacing the test.txt with the file name: curl -F "file=@26bugc.jpg" https://api.anonfiles.com/upload Output: {"status":true,"data":{"file":{"url":{"full":"https://anonfiles.com/f7LaKftby3/26bugc_jpg","short":"https://anonfiles.com/f7LaKftby3"},"metadata":{"id":"f7LaKftby3","name":"26bugc.jpg","size":{"bytes":97116,"readable":"97.12 KB"}}}}}

screenshot

The full and short URL above are the link to our uploaded file. Full: https://anonfiles.com/f7LaKftby3/26bugc_jpg Short: https://anonfiles.com/f7LaKftby3

Frequently Asked Questions:

How long will my files be online? For as long as possible unless the file violates our Terms of Use.

What are the limit of uploads? You are free to upload as long as you don't exceed the following restrictions: Max 20 GB per file Max 500 files or 50 GB per hour. Max 5,000 files or 100 GB per day.

Any restrictions on downloads? No. We do not enforce any form of bandwidth limitations on downloads.

Similar / Alternatives

I have curated similar websites, which works exactly like the one we saw above:

Each of these privacy-oriented file hosting service is absolutely free, has no time limit, provides unlimited bandwidth, 20GB filesize limit, and unlimited file storage. You can also upload files on these websites directly from your browser of use your terminal like we've learnt above. Although these files are not listed anywhere and cannot be accessed by anyone on the internet without the link, if you want to upload some private and personal files consider encrypting them before uploading so only you can access them.