Coder Social home page Coder Social logo

sharex-cdn's Introduction

Basic image, text & file uploader CDN for ShareX which allows you to upload your screenshots, text documents and any other files to your website and have a random link generated. Because of the length these links are very hard to bruteforce.

Requirements

  • ShareX installed
  • A website or webserver (needs to accept PHP and file uploads via POST requests)
  • A domain or subdomain

Setup

Upload Script

  1. Clone the code from GitHub.
  2. Go in the Upload folder.
  3. Open upload.php with Notepad++.
  4. Edit line 7, 8 and 9 to change your password and link (read the comments next to them).
    • Password: this only lets users with the password upload files to your server
    • Domain URL: set this to your domain (or subdomain) and don't forget the / at the end of the line
    • Length: this specifies the length of the randomly generated folder- & filenames (e.g. https://cdn.knif.dev/img/3lfUh/S1E7M.png has a length of 5 (the URL starts with the domain, then /img/, a random folder name with the length you specified (in this case 5), a random file name with the specified length (in this case 5) and the extension (in this case .png)))
  5. Upload the content of the Upload folder to the root directory of your website (I prefer to make a subdomain called "cdn" and put the folder to its directory).
  6. Make sure that sub-folders have permissions set to 755 (and Group ID set to 33 if applicable), with the upload.php script having permissions of 777.

ShareX

  1. Open all three .sxcu files from the ShareX-Config folder with a Notepad++ and change the RequestURL and password to your own.
  2. Open ShareX, click on Destinations and Custom uploader settings.
  3. Click on Import and select the first .sxcu file, repeat this for the others aswell.
  4. In the bottom left select the corresponding uploader (Image, Text and File).
  5. Click on Test to check if everything is working correctly.

Done! That's it. If something doesn't quite work out for you just contact me on Discord and I'll try my best to help you.

Issue

If you get an upload failed error "request entity too large" then your server doesn't accept large files via PHP upload. Here is the fix: Increase PHP upload limit. If you can't increase it yourself you have to contact your hosting provider.

Contact

Please only contact for this specific fork, for the original fork, contact KNIF

Credits

  • Statuspage for their amazing error 404 & 403 templates
  • Pengu for his initial ShareX uploader script I used as a base
  • ShareX for their awesome program that enables us to upload our screenshots
  • KNIF for his original ShareX uploader script, which I made some modifications to

sharex-cdn's People

Contributors

genericnerd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.