Anypaste, upload all types of files from the terminal automatically

anypaste-about

In the next article we are going to take a look at Anypaste. This tool is a simple script that will be used to upload files to compatible hosts according to the type of file, for free and automatically. It will not be necessary to manually log in to the hosting sites and then share our files.

Anypaste will choose the correct hosting sites according to the type of file we want to upload. Simply put, photos will go to image hosting sites, videos will go to video hosting sites, and so on. that later we will be able to share with our contacts. This tool is completely free, open source, lightweight and it will allow us to do everything from the command line of our operating system. This application does not need to depend on any memory-consuming GUI application heavy to upload and share files.

Anypaste installation

As I said before, this tool it's just a script. So there will be no difficult installation steps or anything like that. The necessary file is simply downloaded somewhere where we can execute it, for example / usr / bin / anypaste. Then we just have to make it executable and we can start using this tool instantly.

To obtain the necessary script, we will only have to write the following command in the terminal (Ctrl + Alt + T):

sudo curl -o /usr/bin/anypaste https://anypaste.xyz/sh

Now we will give you execute permission to script that we just downloaded with the following command:

sudo chmod +x /usr/bin/anypaste

Configuration

This script will work freshly unzipped. Does not require any special configuration. The default configuration file can be found in ~ / .config / anypaste.conf and it will be created automatically when it is run for the first time.

anypaste configuration

The only configuration option we will have is ap_plugins. This script uses a plugin system to upload files. We will be able to see the list of plugins enabled under the ap-plugins directive in the anypaste.conf file.

If we install a new plugin we will have to add it to this list. If there are multiple plugins that support the file type, the first one in the array will be selected, so the order is important.

Uses

Upload a single file

To load a single file, for example test-anypaste.jpg, we will execute in the terminal:

anypaste jpg file

anypaste prueba-anypaste.jpg

As you can see from the screenshot, the script has automatically found the compatible hosting site (https://tinyimg.io) with the image file named test-anypaste.jpg and uploaded it. In addition, we are shown the direct link to view / download the file.

We will not only be able to upload .jpg or .png files. This tool can load any other type of image file. In the following example I use a .gif file:

anypaste gif file

anypaste prueba-anypaste-GIF.gif

The download link, obviously we can share it with our family, friends and colleagues. Here is the screenshot of an image that I just uploaded to the tinyimg.io website.

anypaste gif file in browser

Upload multiple files

It is also possible to do multiple file uploads (the same or different file types) at the same time. In the example below, I am uploading two different files, an image and a video file:

anypaste multiple upload

anypaste prueba-anypaste-GIF.gif everest.mp4

Select the plugin to use

As I think is represented in the previous examples, the script chose the "best" plugin automatically. What's more, we will be able to load files with a complement that we choose. For example, to upload files to the gfycat service, we will have to execute in the terminal:

anypaste gif file by selecting plugin

anypaste -p gfycat archivo.gif

To load with a specific plugin, avoiding compatibility checks, we will have to write in the terminal:

anypaste -fp gfycat archivo.gif

Interactive upload

To load files in interactive mode, we will only have to add the -i flag:

anypaste interactive upload gif file

anypaste -i archivo.gif

As you can see in the screenshot, the script will first ask us for permission to determine the add-ons automatically. The plugins available will be listed below and it will ask us to select one from the list. In the same way, we will be able to upload and share files of different types.

Types of accommodation

Every time we want to upload a video file, it will be uploaded to any of the following sites:

  • sendvid
  • streamable
  • gfycat

Here we will have to take into account the order of the configuration file. The script will first try to upload the file to the sendvid site. If there is no plugin for sendvid, it will try the other two sites in the order given. Of course, you can change this in the configuration file.

The images will be uploaded to:

  • tinyimg.io
  • vgy.me

The audio files will be uploaded to:

  • installed

The text files will be uploaded to:

  • hastebin
  • ix.io
  • spring.us

The documents will be uploaded to:

  • docdroid

Any other files will be uploaded to:

  • giraffe
  • file.io

Some of the sites listed above will delete the contents after a particular period of time. Therefore, it is interesting to take a look at the terms and conditions of the website before uploading and sharing the content.

If someone wants to know more about this interesting project, they can consult their web page or the script code on your page GitHub.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.