Skip to content

fredl99/YOURLS-Upload-and-Shorten

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Upload and Shorten Advanced Plugin for YOURLS

Listed in Awesome YOURLS! YOURLS Version PHP Version License Version Discord

Version: 2.0.0

Enhanced by: Master3395 / News Targeted

License: MIT

A powerful YOURLS plugin that allows you to upload files to your server and automatically create short URLs for them. Perfect for sharing files, documents, images, and more with clean, trackable links.

Upload Interface Upload files and create short URLs instantly with an intuitive, modern interface

Quick Start

Installation

  1. Use the Download Plugin or manually upload to /user/plugins/
  2. Activate the plugin in your YOURLS admin panel
  3. Configure settings in "Upload Settings" page
  4. Start uploading files!

Basic Setup

  1. Set maximum file size (default: 10 MB)
  2. Configure allowed file types
  3. Choose storage location
  4. Enable frontend uploads (optional)
  5. Save and test!

Key Features

  • File Upload & Shortening - Upload files and get instant short URLs
  • Admin Panel Integration - Full admin interface with settings management
  • Frontend Upload Support - Allow public users to upload files (configurable)
  • Multiple Storage Locations - Configure different storage paths for various needs
  • File Expiration - Set automatic file cleanup with customizable retention periods
  • Download Tracking - Track file downloads through YOURLS analytics
  • Advanced Security - CSRF protection, MIME validation, path traversal prevention, rate limiting
  • Mobile-First Design - Fully responsive and optimized for all devices
  • Drag & Drop Support - Modern file upload experience with progress indicators
  • Multi-Language Support - Available in English, German, French, Spanish, Chinese, and Norwegian

Features Overview

Core Functionality

  • Upload files and get instant short URLs
  • Full admin interface with settings management
  • Public upload interface (configurable)
  • View, manage, and delete uploaded files
  • Track file downloads through YOURLS analytics

Admin Features

  • Configure multiple storage locations
  • Set maximum file sizes for uploads
  • Control allowed file extensions
  • Configure automatic file cleanup
  • Enable/disable public uploads
  • Bulk file management
  • Pagination for large file lists
  • Advanced filtering and search

Admin Integration Seamlessly integrated with YOURLS admin panel for easy management

Frontend Features

  • Clean, responsive upload form
  • Drag & drop file upload
  • Real-time progress indicators
  • Copy to clipboard functionality
  • Mobile responsive design
  • Custom upload messages
  • Rate limiting per IP

Public Upload Interface Beautiful public upload interface with file guidelines and easy-to-use controls

Security & Performance

  • CSRF protection for secure form submissions
  • MIME type and content validation
  • Path traversal prevention
  • Rate limiting to prevent abuse
  • Clean URL support (SEO-friendly)
  • Modular code structure (under 500 lines per file)
  • Optimized database queries

Documentation

Installation

See the complete Installation Guide for detailed instructions.

Quick Install

  1. Install via Download Plugin or clone to /user/plugins/
  2. Set directory permissions (755 for plugin, 777 for uploads)
  3. Activate in YOURLS admin panel
  4. Configure settings

For detailed steps, troubleshooting, and server-specific instructions, see the Installation Guide.

Configuration

Configure the plugin through Admin Panel → Upload Settings. See the Configuration Guide for detailed settings documentation.

Settings Page Configure all plugin settings from the intuitive admin interface

Key Settings

  • File Upload Limits - Max size and allowed types
  • Storage Locations - Multiple storage paths with individual settings
  • File Expiration - Automatic cleanup (24 hours to never)
  • Frontend Uploads - Public upload controls and restrictions
  • Security - CSRF protection, MIME validation, rate limiting

For complete configuration details, including advanced options and security settings, see the Configuration Guide.

Usage

See the complete Usage Guide for detailed instructions.

Quick Usage

Admin Upload:

  1. Go to Upload & Shorten in admin panel
  2. Select file, customize options
  3. Get instant short URL

Frontend Upload (if enabled):

  1. Visit YOURLS homepage
  2. Use upload form
  3. Share generated short URL

File Management:

  • View, search, and filter files in admin panel
  • Track downloads and statistics
  • Bulk operations and expiration management

File Management Manage all your uploaded files with detailed statistics and easy controls

For detailed workflows, best practices, and advanced features, see the Usage Guide.

Internationalization

The plugin is available in 6 languages. See the Internationalization Guide for details.

Supported: English, German, French, Spanish, Chinese (Simplified), Norwegian (Bokmål)

Configure in user/config.php:

define('YOURLS_LANG', 'nb_NO'); // Use your language code

Want to contribute a translation? See the Internationalization Guide.

Compatibility

Compatible with YOURLS 1.7+, PHP 7.4-8.6, and all major web servers (Apache, Nginx, OpenLiteSpeed, LiteSpeed Enterprise). Works with CyberPanel, cPanel, and Plesk. Tested on AlmaLinux 9.6 & 10.

For complete compatibility details, system requirements, and theme compatibility, see the Compatibility Guide.

Troubleshooting

Having issues? See the Troubleshooting Guide for solutions.

Common Issues

  • File uploads not working - Check permissions and PHP limits
  • Short URLs not redirecting - Verify file location and .htaccess
  • Frontend uploads not showing - Check settings and theme compatibility
  • Database errors - Verify tables and permissions

Debug Mode

// Add to user/config.php
define('YOURLS_DEBUG', true);
define('UPLOAD_DEBUG', true);

For detailed solutions and debug instructions, see the Troubleshooting Guide.

Changelog

Current Version: 2.0.0 (October 2025)

Complete rewrite with enhanced security, modern UI/UX, frontend uploads, file expiration, multiple storage locations, and comprehensive admin interface.

View complete version history and release notes in the changelogs directory.

Support & Contribution

Contributing

We welcome contributions! Here's how you can help:

  1. Report Bugs - Use the issue tracker to report problems
  2. Suggest Features - Propose new functionality
  3. Translate - Help with language translations
  4. Code - Submit pull requests for improvements
  5. Documentation - Improve documentation and examples

Author

Master3395 / News Targeted

Credits

Enhanced by: Master3395 / News Targeted

For complete development history, original authors, and contributor credits, see the Version 1.0.0 Changelog.

License

MIT License - Free to modify and distribute.

About

YOURLS plugin: Upload files to your webserver and create short-URLs to them in one step.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%