Giter Site home page Giter Site logo

node-sharex-server's Introduction

node-sharex-server

What is this

node-sharex-server is a ShareX upload server which is easy to setup and to use. Currently node-sharex-server provides the following features:

  • File-sharing:
    • Uploading files (also images)
    • Allowing only configured file extensions (for more safety)

Installation

NOTE: You need git (to clone this repo) and nodejs (with npm) to run this program.
First we have to clone this repo. You can do that by typing git clone [email protected]:Moquo/node-sharex-server.git (for ssh) or git clone https://github.com/Moquo/node-sharex-server.git (for https). After going into the directory, we have to install the dependencies. Type npm install to do so. You can start node-sharex-server now by typing node app.js. You could use e.g. pm2 to run node-sharex-server in the background. Environment variables:

  • PORT: The port which is used by the web server

Configuration

NOTE: To make changes effective, you have to restart the server!
You can configure the server in the config.json file. Options:

  • keys: You can add keys (authentication tokens) here.
  • fileSizeLimit: You can set the file size limit (in bytes) here. Example: You want to set the limit to 100 mb. That means we have to change the value to 100 (MB) * 1024 (kB) * 1024 (B) = 104857600 (B).
  • fileNameLength: The length of the generated file names.
  • serverUrl: The url where you can reach the server without the finalizing slash (/).
  • fileExtensionCheck: Check the extension of uploaded files
    • enabled: Is this feature enabled?
    • extensionsAllowed: The extensions which are whitelisted (if the feature is enabled).

ShareX client configuration

NOTE: Replace UPLOADER_NAME, SERVER_URL and YOUR_KEY with your own values!

{
    "Name": "UPLOADER_NAME",
    "DestinationType": "ImageUploader, FileUploader",
    "RequestType": "POST",
    "RequestURL": "SERVER_URL/upload",
    "FileFormName": "file",
    "Arguments": {
        "key": "YOUR_KEY"
    },
    "ResponseType": "Text",
    "URL": "$json:file.url$",
    "ThumbnailURL": "",
    "DeletionURL": "$json:file.delete_url$"
}

License

MIT

node-sharex-server's People

Watchers

James Cloos avatar Idris Dev 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.