Skip to content

Simple Docker container to "upload" files from the local network to the host PC using an html form.

Notifications You must be signed in to change notification settings

fabalexsie/simple-web-upload-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Web Upload Docker

http support https support Docker

Screenshot-PC

Example execution:

docker run --rm -it \
  -v "$PWD/uploads:/var/www/html/uploads" \
  -e HOSTIP=$(hostname -I | awk '{print $1}') \
  -p 1337:443 \
  --pull always \
  ghcr.io/fabalexsie/simple-web-upload-docker:master

HOSTIP can also be set manually to the local ip for example 192.168.X.X It is only needed for the self signed certificate, when reaching the webapp via https (necessary for PWA).

The webserver is visible on host port 1337 with http and https (self-signed).

or via compose.yml:

services:
  app:
    image: ghcr.io/fabalexsie/simple-web-upload-docker:master
    ports:
      - "1337:443" # webserver is visible on host port 1337
    volumes:
      - ./uploads:/var/www/html/uploads
    environment:
      - HOSTIP=192.168.X.X # IP of the host machine for the self signed certificate (https is needed for PWA)

Go to http://localhost:1337 to upload files.

Files will be uploaded to ./uploads

Upload limit size: 10000MB

Usage as PWA (Progressive Web App)

After initial start you find the root ca certificate in the uploads folder. Install it on your device to trust the self signed certificates for the local ip defined by the HOSTIP environment variable. After that you can install the webapp as PWA on your device. You may need to reload the page after the certificate is installed.

A PWA can only be installed via https. So please open the webapp via https://localhost:1337 after installing the ca certificate.

Advantage: You can directly share files from your native share menu on the device to the webapp.

About

Simple Docker container to "upload" files from the local network to the host PC using an html form.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • PHP 68.5%
  • Dockerfile 18.9%
  • Shell 12.6%