Before you start…

This code is nodejs version of source that my friend GDLev.

He is open source creator such as I, you can discover his work by clicking there: Click!

He also created a good frontend tat is fully compitable with my code: uploadpopup

All my codes can be used for free in non commercial usage. If you want to support me just click star button and don’t delete author info from code

Setup

Before we start to cofigurating uploader make sure that you have registered domain & vm to host uploader.

Required things:

NodeJS 16.x.x + | https://nodejs.org/
Express         | npm i express
ejs             | npm i ejs
formidable v2   | npm i formidable

Config:

// Cofiguration
const port = 80;
const dir = 'files';
const tokens = '12345'
const domain = 'example.com'

embedSupport = false

res.render('embed', {
    imglink: `https://${domain}/${image}`,
    file: req.params.filename + ` | ${image}`,
    // Config
    title: `Simple Uploader`,
    description: `created by kameHame HA`,
    color: `#ffffff`
})

Find this code in app.js.

  • port – web app server port
  • dir – folder where you want to store uploaded files
  • tokens – special token to make sure that only you have access to uploader
  • domain – name of domain you will be using for uploader
  • title – embed title
  • description – embed description
  • color – embed color

Configure this how you want 🙂

Sharex custom uploader:

Open sharex main window, goto: Destinations -> Custom uploader settings, click New. Next copy those settings:

Then change Image uploader & File uploader to your new custom uploader

Web uploader

Goto: <YOUR_DOMAIN>/, choose file & provide valid token, click Upload and have fun!

Access uploaded file by typing <YOUR_DOMAIN>/<FILE_NAME>

GitHub

View Github