Skip to content

A very simple web server for uploading files to.

License

Notifications You must be signed in to change notification settings

rdpickard/uplily

Repository files navigation

UpLily

UpLily is a web service for uploading and downloading files over HTTP in situations where transferring files between hosts is hindered by network policy or accessibility.

The service can run locally on a personal computer or 'serverless' cloud services such as AWS Elastic Beanstalk and Heroku Dynamos.

Deploy

Screenshot

Configuring S3 as storage

For large files UpLily can be configured as a front end to private S3 buckets.

To configure S3 backend set the environment variables S3_BUCKET, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY.

S3_BUCKET is the name of the bucket. Just the name, not the ARN.

AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are the IAM keys for a user that can access the bucket.

In the bucket permissions make sure the CORS settings allow for access from the server. Full directions on CORS are here on the AWS documentation. An example CORS setting to allow access from a local instance of UpLily running on 127.0.0.1:5000

[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "PUT",
            "POST",
            "DELETE",
            "GET"
        ],
        "AllowedOrigins": [
            "http://127.0.0.1:5000"
        ],
        "ExposeHeaders": []
    },
 ]

If the environment variables are set and the CORS is configured in the S3 bucket the UpLily UI will have an option for uploading to local FS or S3

Screenshot

Example use cases

Two users in different, non-publicly accessible networks

When two users are in networks that don't allow incoming connections from the Internet, set up a UpLily instance in as a Heroku application as a 'drop off location'

User on corporate network that has constrained files leaving the network

It isn't uncommon for corporate IT to put restrictions on network file transfers. Email size is often capped, filesharing sites such as AWS S3, box.com & PasteBin are often blocked by web proxies, protocols such as scp and ftp blocked at edge firewalls.

Hosts on a LAN with no Internet access

"Barebones" smart devices or appliances don't often have the capability to run file sharing protocols that are common on personal computers or full servers. HTTP is an almost universally supported protocol by even the most basic systems.

Recipes

Running on a free tier Heroku Dyno in the cloud

This method requires that you have Git installed (free), a Heroku account (free tier account works fine) and the Heroku command line tools installed (free).

git clone https://github.com/rdpickard/uplily
cd uplily/
heroku create
git push heroku master
heroku ps:scale web=1
heroku open

After you're finished, stop and erase the Dyno

heroku destroy

If you want S3 as a backend set the environment variables in the application Settings > Config Vars section

Running on a locally on your machine

This method requires that you have Python 3.4 or greater installed.

git clone https://github.com/rdpickard/uplily
cd uplily/
pip3 install -r requirements.txt
python3 application.py

This recipe works fine with a python virtual environment.

The output of running application.py will tell you the URL to access the web app.

Running on a AWS Elastic-Beanstalk

This method requires you have an existing AWS account, the AWS command line tools installed.

This method has a monetary cost billed by Amazon. It is probably low, but it isn't free to run on AWS.

git clone https://github.com/rdpickard/uplily
cd uplily/
eb init -p python-3.6 uplily --region us-east-2
eb create uplily-env
eb open

After you're finished, stop and release all of the AWS resources

eb terminate

Projects and open code used

  • Semantic UI version 2.4 of the web layout and javascript framework
  • jQuery version 3.4.1 of the javascript framework
  • Flask python WSGI web application framework

And a whole lot of great Python3 modules that are listed in requirements.txt file.

About

A very simple web server for uploading files to.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published