Some days ago, I had to transfer a big file. Of course, you can’t use your mail service to send big files, and you have to use a dedicated tool. As I don’t want to use sensitive or personal files on cloud, I avoid to use website such as WeTransfert or Web alternative, and I don’t want to create account for a single use in these websites.
I used to upload in a self-hosted tool, Jirafeau (https://gitlab.com/mojo42/Jirafeau). This tool works nicely but I find it not really adapt to my vision. So… I decided to develop mine..
I wanted something:
- Simple and modern
- QRcode (to transfert to my phone)
- No database
- Manage expired or Single download files
- Using SSL for transfert.
I turn again to python and Flask to develop something (as for my tool Hype ).
Flask is a very nice framework and provide a lot of tools to my need; You can easily add a certificate (autosigned), you can force a file for downloading, automate actions… And many plugins will complete my code (QRcode, Drag and Drop…)
My first reaction when I start this project was « Ok it will be fast to do, it’s easy as I already use a Dropzone and I know how to force a download ». Then I start to work on it. I start to think about all the steps I have to do and all info I will need ; As I don’t want to implement a database, where to store info ? How to retrieve and what info I will need (to check retention, single download…)? How to manipulate date and time easily ?
I stopped… It was not as simple..
Then I start again, but this time, as all development should start : an algorithm.
Once the algorithm done, everything came easily, and I just add to organize and convert my algorithm to code.
I let you discover my code here and feel free if you see amelioration or bugs :