Skip to content

About

Automatic Zipline file upload monitors a directory for new files, and uploads the file.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

52 Commits

Folders and files

Repository files navigation

ZiplineAutoUpload Banner

📤 ZiplineAutoUpload: Your Instant File Sharing Companion! 🚀

Discord Stars Forks Issues License
Codacy Powered by Zipline Made with Python

Because manually uploading files is so last century! 🦕


🌟 Welcome to the Future of File Sharing!

ZiplineAutoUpload is your personal file-sharing assistant that makes sharing files as easy as dropping them into a folder. Simply save or move a file to your monitored folder, and BOOM! 💥 - the file is automatically uploaded, the link is copied to your clipboard, and you're ready to share in seconds!

🎯 Features That'll Make You Feel Like a File-Sharing Wizard

👀 Automatic Monitoring

Drop a file and let the magic happen - no clicks required!

📋 Instant Clipboard Copy

Upload links are automatically copied and ready to share!

🔍 Smart File Filtering

Only uploads the file types you want, ignoring the rest!

🌐 Browser Integration

Optionally opens your uploaded files right in your browser!

🚀 Requirements

🛠️ Installation & Setup

  1. Clone this repository or download the source code:

    git clone https://github.com/Valhalla-Development/ZiplineAutoUpload.git
  2. Navigate to the project directory:

    cd ZiplineAutoUpload
  3. Install required dependencies:

    pip install -r requirements.txt

⚙️ Configuration

Copy the example env file, then drop in your folder, Zipline URL, and token:

cp .env.example .env
MONITOR_FOLDER_PATH=/absolute/path/to/your/folder
ZIPLINE_UPLOAD_URL=https://your.zipline.instance/api/upload
ZIPLINE_TOKEN=your_access_token_here
OPEN_URL_IN_BROWSER=false
LOG_LEVEL=INFO
LOG_FILE=

Configuration is loaded in this order: existing environment variables, .env in the current working directory, then .env beside main.py as a fallback. Earlier values take precedence. This also applies to the installed zipline-auto-upload command. MONITOR_FOLDER_PATH must point to a directory.

🎬 Usage

  1. Start the Upload:

    python main.py
  2. Drop files into your monitored folder.

  3. Watch the magic happen! Each valid file will be:

    • ✅ Automatically uploaded
    • 📋 URL copied to clipboard
    • 🌐 Opened in browser (if enabled)

Files are checked again when they reach the upload worker. Size, modification time, and file identity must remain unchanged for one second before reading. Each upload uses a snapshot smaller than 40 MiB, and retries send the same bytes. Renames into the monitored folder and supported close-write events are handled. An unchanged file version is remembered for the 32 most recently uploaded paths; events received while a file is queued or uploading do not add duplicate work.

The quiet period is a readiness heuristic. For producers that pause during long writes, save under a temporary unsupported extension and rename to the final supported extension when writing is complete.

Pressing Ctrl+C stops monitoring, cancels pending uploads, and allows any active HTTP request to finish. File readiness checks and retry delays are interrupted. The process may wait for the active request's configured network timeout.

📊 What to Expect

When running, you'll see:

  ZIPLINE  auto-upload
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Folder       /absolute/path/to/your/folder
  Host         your.zipline.instance
  Token        ••••here
  Types        png, jpg, jpeg, mov
  Limit        40 MB
  Browser      disabled
  Config       working-directory .env + environment
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Ready to upload.  Ctrl+C to stop · LOG_LEVEL=DEBUG for more detail

14:05:01  INFO  uploaded screenshot.png (0.42 MB) -> https://your.zipline.instance/u/filename.png

🤝 Contributing

Run the local checks before submitting changes:

ruff check .
python -m unittest discover -s tests -v

The tests use temporary files and mocked HTTP, clipboard, and browser operations.

Want to make this even more awesome? Here's how:

  1. Fork it
  2. Create your feature branch:
    git checkout -b feature/amazing-feature
  3. Commit your changes:
    git commit -m '✨ (uploads): add a new upload option'
  4. Push to the branch:
    git push origin feature/amazing-feature
  5. Open a Pull Request

📜 License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details. (It's mostly "Share the love, and keep it open!")

🙏 Acknowledgments

  • Zipline for the awesome file hosting service
  • Watchdog for the reliable file monitoring
  • All contributors and users who make this project better!

📬 Join Our Community

Got questions? Need help? Join our Discord server - where we're always happy to help!


About

Automatic Zipline file upload monitors a directory for new files, and uploads the file.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages