HaschekSolutions / pictshare

:camera: PictShare is an open source image, mp4, pastebin hosting service with a simple resizing and upload API that you can host yourself. :rice_scene:

docker selfhosted encryption image-uploader images mp4-uploads picture

PictShare

PictShare is an open source image, mp4, pastebin hosting service with a simple resizing and upload API that you can host yourself.

Features

Image and MP4 Hosting

  • Upload and host images and MP4 videos, keeping them secure under your own domain
  • Share your images and videos with ease
  • Browse your images by name, size, or upload date

Simple API

  • Resizing and uploading is as simple as a single cURL request
  • Images served from static directory
  • Powerful and intuitive

Encryption

  • All data is encrypted at rest using AES-256, ensuring the security of your images and videos

Deployment

PictShare can be easily deployed using Docker. The following steps will guide you through the deployment process:

  1. Clone the PictShare repository: git clone https://github.com/notates/pictshare.git

  2. Create a .env file in the cloned repository and set the following environment variables:

    • PICTSHARE_URL: The base URL of your PictShare instance
    • PICTSHARE_SECRET: A secret key used to encrypt data
    • PICTSHARE_ENCRYPTION_KEY: Base64-encoded AES-256 encryption key
  3. Build the Docker image: docker build -t pictshare .

  4. Run the container: docker run -p 80:80 pictshare

Usage

To upload an image, send a POST request to the /api/upload endpoint with the following fields:

  • image: The image file in multipart/form-data format
  • resize: The desired width and height of the resized image (optional)

The endpoint will return a JSON response with the URL of the uploaded image.

To upload an MP4 video, send a POST request to the /api/upload_mp4 endpoint with the following fields:

  • mp4: The MP4 video file in multipart/form-data format

The endpoint will return a JSON response with the URL of the uploaded MP4 video.

Contributing

Contributions are welcome! Please read the contributing guidelines before submitting a pull request.