Electro Hobby
How to use MediaFire as file storage on Linux server - Printable Version

+- Electro Hobby (https://electrohobby.ca/forum)
+-- Forum: Public (https://electrohobby.ca/forum/forumdisplay.php?fid=1)
+--- Forum: Articles (https://electrohobby.ca/forum/forumdisplay.php?fid=3)
+--- Thread: How to use MediaFire as file storage on Linux server (/showthread.php?tid=283)



How to use MediaFire as file storage on Linux server - roman - 2017-03-11

MediaFire is best deal for online storage. The cost for personal use is $5/1TB/m or $45/1TB/m. I own an account since 2014 that I keep paying $2.50/m and barely using. There is no upload/download fees and speeds are quite reasonable, lately I measured download around 1.5-5MB/s, although upload seems to be way faster. Good for backup or sharing files. Downloading 1GB over 2MB/s connection takes approx 8min.

Unfortunately it is mostly designed as web based file sharing storage. They also have Windows client that synchronizes a folder on your PC automatically. They released SDK for C++, JS, PHP, Java, Objective C, C# and Python, that allow uploading files: https://github.com/MediaFire

Then, how to use it then as mounted filesystem on Linux ?

MediaFire supports fuse driver: https://github.com/MediaFire/mediafire-fuse

Note that your files may be public by default. But if you create a directory and lock it as private, any files ad subdirectories inside will inherit privacy.

I have tested the following on Ubuntu 14 machine (if you are root, drop sudo):

Code:
sudo apt-get install cmake build-essential libjansson-dev libcurl4-openssl-dev libfuse-dev libssl-dev git
git clone https://github.com/MediaFire/mediafire-fuse.git
cd mediafire-fuse
mkdir build
cd build
cmake ..
make
sudo make install
cd ~
rm -r mediafire-fuse
mkdir  -p ~/.config/mediafire-tools

Now open file ~/.config/mediafire-tools/config and add your MediaFire credentials:

Code:
--username myemail@mydomain.com
--password MySuperSecretPassword

Don't forget that if you want to mount it via sudo, your home directory is /root so the credentials will be in /root/.config/mediafire-tools/config

Now you can use FTP style console to access your files using mediafire-shell

In order to mount it as filesystem:

Code:
mkdir -p /mnt/mf
chmod 0777 /mnt/mf
mediafire-fuse /mnt/mf