Giter Club home page Giter Club logo

tannerreynolds / sharex-upload-server Goto Github PK

View Code? Open in Web Editor NEW
390.0 7.0 111.0 622 KB

AKA ShareS - Feature full & Stable ShareX and file server in node. Includes images, videos, code, text, markdown rendering, password protected uploads, logging via discord, administration through Discord, url shortening, and a full front end. Use standalone or via reverse proxy

License: GNU General Public License v3.0

JavaScript 91.24% Shell 0.99% Dockerfile 0.18% CSS 7.59%
nodejs sharex-server webserver file-upload discord discordapp discordbot url-shortener sharex gallery

sharex-upload-server's Issues

SSL: Failed Handshake using Cloudflare

Hiya, bit stuck on setting up the server. Whenever I head over to my cdn domain I get a Cloudflare error saying that the SSL failed to Handshake. Are there any fixes I can do to solve this?

Feature request

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
When pictures are sent to Discord other platform, it will just send the picture, me personally, i would like the picture to be in an embed, and then in the title the file name, and the url is the url of the picture, i would like this to be an optional option in config.json

Describe alternatives you've considered
None.

Additional context
What it looks like right now:
image

What i want it to be:
image

Cannot install ShareS Server, fails during install, refuses to run.

Describe the bug
Cannot install ShareS Server, fails during install, refuses to run.

To Reproduce
Steps to reproduce the behavior:
Attempt to run install.sh
Watch it fail when attempting to download Image-ExifTool from Sourceforge.

Expected behavior
Installer expected to install ShareS Server, fails at downloading Image-ExifTool as URL 404's

ShareS Version
Latest Release

Screenshots
image

Desktop (please complete the following information):

  • OS: Ubuntu 16.04
  • Browser N/A
  • Version Release

Additional context

HTTP request sent, awaiting response... 302 Found
Location: https://downloads.sourceforge.net/project/exiftool/Image-ExifTool-11.80.tar.gz?download&failedmirror=iweb.dl.sourceforge.net [following]
--2020-01-15 17:10:41--  https://downloads.sourceforge.net/project/exiftool/Image-ExifTool-11.80.tar.gz?download&failedmirror=iweb.dl.sourceforge.net
Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 216.105.38.13
Connecting to downloads.sourceforge.net (downloads.sourceforge.net)|216.105.38.13|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2020-01-15 17:10:41 ERROR 404: Not Found.

tar: Image-ExifTool-11.80.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
./install.sh: line 24: cd: Image-ExifTool-11.80: No such file or directory
Can't open perl script "Makefile.PL": No such file or directory
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'test'.  Stop.
make: *** No rule to make target 'install'.  Stop.
Finished installing dependencies!
root@hornyfur-server:/home/phoenix/ShareX-Upload-Server#```

https issues

The gallery will load images over http. I've noticed http being used instead of https in a few places like after you submit a url it gives you http.

Popups

When I go to the site and upload the url changes but the popup box never comes up

Unable to start server

Describe the bug
Process gives error:

ShareS > TypeError: Cannot read property 'log' of undefined
ShareS > at process. (/home/chloe/ShareX-Upload-Server/src/index.js:43:54)
ShareS > at process.emit (events.js:322:22)
ShareS > at processPromiseRejections (internal/process/promises.js:209:33)
ShareS > at processTicksAndRejections (internal/process/task_queues.js:98:32)

Continuously

To Reproduce
This happens when I start the app through pm2

Expected behavior
I expected the service to start, and the web server to be available

I am unable to load the web page

ShareS Version
4.5.2 running on Ubuntu 16.04 LTS

Discord Embeds

Hi, is there any way to make discord preview an embed that contains the image instead of just the image? I’ve been trying cloudflare workers but they seem to not be working for me, how can I make the link preview an embed? Thanks
The discord server links that is shown on startup doesn’t work btw

Dockerfile wrong

Hey,

The docker file is wrong currently it is

FROM node:alpine

WORKDIR /usr/src/app
COPY src/ package.json .

RUN apk --no-cache add exiftool &&
npm i

EXPOSE 80 443
CMD ["node", "index.js"]

And to get it working had to change it to:

FROM node:alpine

WORKDIR /usr/src/app
COPY src/ package.json /usr/src/app/

RUN apk --no-cache add exiftool &&
npm i

EXPOSE 80 443
CMD ["node", "index.js"]

Also you have the docker command as docker built instead of docker build

Other then that it works great except the discord bot seems to stop working after around an hour, to replicate that just set it up as you say and then let it run for a while and it will throw an error in console or pm2 whichever, to fix this I restart my docker container every 30 mins

Key is undefined

Describe the bug
Both console logs and Discord bot logs for uploads (including puploads) show the key as undefined.

To Reproduce
Steps to reproduce the behavior:

  1. Install the latest version of the Repo
  2. Configure Discord bot settings
  3. Upload a file as a pupload
  4. View console logs and Discord bot log

Expected behavior
The logs should display Key: SomeKeyGoesHere

ShareS Version
v4.5.3

Screenshots
Discord Log: https://cdn.foxybots.xyz/5fQtZ2
Console Log: https://cdn.foxybots.xyz/QhaC5n

Desktop (please complete the following information):

  • OS: Windows 10 x64
  • Browser: Firefox
  • Version: 81.0.1

Smartphone (please complete the following information):

  • Device: N/A
  • OS: N/A
  • Browser: N/A
  • Version: N/A

Additional context
None able to be provided.

TypeError when opening Gallary tab

When opening the gallery tab on the upload server, this Typeerror shows in pm2 logs:

5||index    | TypeError: Cannot read property 'includes' of undefined
5|index    |     at ShareXAPI.auth (/root/projects/ShareX-Upload-Server/src/util/auth.js:2:15)
5|index    |     at ShareXAPI.post (/root/projects/ShareX-Upload-Server/src/server/routes/gallery.js:13:15)
5|index    |     at Layer.handle [as handle_request] (/root/projects/ShareX-Upload-Server/node_modules/express/lib/router/layer.js:95:5)
5|index    |     at next (/root/projects/ShareX-Upload-Server/node_modules/express/lib/router/route.js:137:13)
5|index    |     at Route.dispatch (/root/projects/ShareX-Upload-Server/node_modules/express/lib/router/route.js:112:3)
5|index    |     at Layer.handle [as handle_request] (/root/projects/ShareX-Upload-Server/node_modules/express/lib/router/layer.js:95:5)
5|index    |     at /root/projects/ShareX-Upload-Server/node_modules/express/lib/router/index.js:281:22
5|index    |     at Function.process_params (/root/projects/ShareX-Upload-Server/node_modules/express/lib/router/index.js:335:12)
5|index    |     at next (/root/projects/ShareX-Upload-Server/node_modules/express/lib/router/index.js:275:10)
5|index    |     at serveStatic (/root/projects/ShareX-Upload-Server/node_modules/serve-static/index.js:75:16)

Fails to install ExifTool

Describe the bug
I ran the ./install.sh, and everything went fine until it tried to install ExifTool. It fails to connect to there. It waits a bit, then says the connection timed out, then tries again forever.

To Reproduce
Steps to reproduce the behavior:

  1. Follow the installation instructions.
  2. Wait until it tries to install ExifTool

Expected behavior
For it to install everything smoothly.

ShareS Version
4.5.3

Screenshots
https://heroku.is-a-bad.host/i/6rwm.png

Desktop (please complete the following information):
[N/A]

Smartphone (please complete the following information):
[N/A]

Additional context
None

Unable to use admin key

I setup an admin key, but when I try to use it ShareX returns URL: Unauthorized. When I use the normal key, it does work.

Can I test the server on localhost?

I tried testing the server on localhost by setting the domain to http://localhost and the port to 3000, localhost:3000 said my domain is unauthorized, is it possible to test this server on localhost? Please help.......

Custom port

Don't force 80/443, allow for specifying port.

Running via IIS

Hello,

I'm trying to run this through IIS Rewrite module as a subfolder.
https://xyz.com/upload

Browsing https://xyz.com/upload works fine but the paths however are broken, since they all point to the root domain https://xyz.com.

I could just switch the paths in each file (under src/app/) but that seems like taking the wrong path.
Any idea on how one would be able to fix this?

If not for IIS then I'd love to know how I could do this on nginx.

Thank you advance!

Random crashes and errors

The process randomly crashed, and threw this err:

3|i.smc.wt | TypeError: Cannot read property 'get' of undefined
3|i.smc.wt |     at Shard.wsEvent (/root/projects/i.smc.wtf/node_modules/eris/lib/gateway/Shard.js:433:48)
3|i.smc.wt |     at Shard.onWSMessage (/root/projects/i.smc.wtf/node_modules/eris/lib/gateway/Shard.js:1721:26)
3|i.smc.wt |     at WebSocket.ws.onmessage (/root/projects/i.smc.wtf/node_modules/eris/lib/gateway/Shard.js:1598:33)
3|i.smc.wt |     at WebSocket.onMessage (/root/projects/i.smc.wtf/node_modules/ws/lib/event-target.js:120:16)
3|i.smc.wt |     at WebSocket.emit (events.js:197:13)
3|i.smc.wt |     at Receiver.receiverOnMessage (/root/projects/i.smc.wtf/node_modules/ws/lib/websocket.js:720:20)
3|i.smc.wt |     at Receiver.emit (events.js:197:13)
3|i.smc.wt |     at Receiver.dataMessage (/root/projects/i.smc.wtf/node_modules/ws/lib/receiver.js:414:14)
3|i.smc.wt |     at Receiver.getData (/root/projects/i.smc.wtf/node_modules/ws/lib/receiver.js:346:17)
3|i.smc.wt |     at Receiver.startLoop (/root/projects/i.smc.wtf/node_modules/ws/lib/receiver.js:133:22)

404 error on /api/files

Describe the bug
Hey! I wanted to start using this for my screenshots, but when I tried using the sxcu file for the images and files part, I got a site not found error... Am I doing something wrong?

Expected behavior
To find the website

ShareS Version
4.5.3

Screenshots
Cant really take screenshots

Desktop (please complete the following information):

  • OS: Linux PopOS 20
  • Browser FireFox

Additional context
I am using sharenix, but configs should be the same as windows sharex

Firefox

When on Firefox, the webpage is essentially broken, there are no boxes and everything is edge to edge.

Hosting Question

Can I use Pterodactyl Panel to host this? And can I use an custom port? (like 8100)

Text uploader failing

Following your tutorial, the text uploader is not passing the sharex test. Image, file, url shortener, are all working.

Thanks.

ipban dosnt work :(

Describe the bug
ipbanning people dosnt work

To Reproduce
Steps to reproduce the behavior:

  1. go to discord with the bot
  2. use the ipban command on a ip
  3. bot responds but the ip can still use uploader

Expected behavior
user cant use the uploader

ShareS Version
latest

Screenshots
(IPbanning)
https://ss.2mpcraft.xyz/998GiZtx
(after you get ip banned)
https://ss.2mpcraft.xyz/fJqSFD3z.gif

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser firefox
  • Version 74.0 (64 bit)

Ubuntu 20.04 support

Is your feature request related to a problem? Please describe.
So I was trying to install it on Ubuntu 20.04 with node v10.22.0 but it errored out with
`internal/modules/cjs/loader.js:638
throw err;
^

Error: Cannot find module 'express'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/sharex/img/src/server/app.js:2:17)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)`
Describe the solution you'd like
Would it work on Node 8 or something?

Images not previewing in Discord when using SSL (LetsEncrypt/Certbot certificate)

Basically title.
I tried a few different servers, domains and certificates now.
As soon as you swap from http to https the image previews in Skype, Telegram, Twitter and a few others when the link is posted, just Discord decides to not preview it. Clicking the link displays the image/video/text just fine.

Using Certbot to generate certificates for domain.com and *.domain.com

If "secure": is set to false it works and previews.

Domains tested on: https://valorant.dev and https://files.mango.sd. (both are set to public)

Tested with Ubuntu 16.04 and 20.04.

If this is an error on the ShareX Upload Server side it would be wonderful if it could be fixed.

Edit: example config (currently the one from https://valorant.dev
Edit2: Neither Nginx nor Apache are running on those servers, its just the ShareX Server

{
  "key": [""],
  "domain": "valorant.dev",
  "puploadKeyGenLength": 64,
  "public": true,
  "maxUploadSize": 50,
  "markdown": true,
  "port": 80,
  "secure": true,
  "fileNameLength": 4,
  "shortUrlLength": 3,
  "securePort": 443,
  "ratelimit": 1000,
  "dateURLPath": false,
  "allowed":[
    "png", "jpg", "gif", "mp4", "mp3", "jpeg", "tiff", "bmp", "ico", "psd", "eps", "raw", "cr2", "nef", "sr2", "orf", "svg", "wav", "webm", "aac", "flac", "ogg", "wma", "m4a", "gifv"
  ],
  "admin":{
    "key": ["admin pass key goes here"],
    "maxUploadSize": 1024,
    "allowed": [
    "png", "jpg", "gif", "mp4", "mp3","jpeg", "tiff", "bmp", "ico", "psd", "eps", "raw", "cr2", "nef", "sr2", "orf", "svg", "wav", "webm", "aac", "flac", "ogg", "wma", "m4a", "gifv", "html"
     ]
  },
  "paste": {
    "maxUploadSize": 20
  },
  "discordToken": "Discord Token Here (required if you want API monitoring through Discord)",
  "discordAdminIDs": ["discord IDs of people who can run commands go here", "Like this"],
  "discordChannelID": "the channel you're trying to send api monitor updates to",
  "prefix": "enter prefix for bot commands here"
}

Site Name Config

Is your feature request related to a problem? Please describe.
N/A

Describe the solution you'd like
Allow the configuration of the site name via the config.json file.

Describe alternatives you've considered
The only alternative currently available is to modify the site files directly.

Additional context
Concept: https://cdn.foxybots.xyz/aIkkh7

Can't use full SSL in docker

Describe the bug
Despite placing key.pem and cert.pem in /src the SSL is not working. It says, working in flexible SSL mode.

To Reproduce
Place ssl certs in /src as displayed in the docker logs

Expected behavior
load page on https://SERVERIP:8443

ShareS Version
4.5.3

Screenshots
ERR_SSL_PROTOCOL_ERROR

Desktop (please complete the following information):

  • OS: Windows 10
  • Chrome
  • Latest

certs:

ls src/*.pem

src/cert.pem src/key.pem

also a bit more documentation or detailed readme would be nice!

Add config setting to overwrite http/https prefix on return adress

It would be a good idea to have a setting to always return the https prefix even when the application is running with the "secure": false setting.
If you run Nginx as a reverse proxy to handle the HTTPS stuff for you and run the actual app in HTTP mode, you get a link prefixed with http, even though your actual connection to the server from the outside is done securely.
The current bypass is to regex the ShareX return adress to have http://(.*) in the Regex-List and https://$regex:1|1$ in the URL and Thumbnail URL field in your custom uploader settings.

docker version not working

Describe the bug
docker won't start

To Reproduce
Steps to reproduce the behavior:

  1. run the command
docker run --name "sharex-upload-server" -d \
    -v $(pwd)/src/config.json:/usr/src/app/config.json \
    -v $(pwd)/src/db.json:/usr/src/app/db.json \
    -v $(pwd)/src/server/uploads/:/usr/src/app/server/uploads/ \
    -p 805:80 -p 4435:443 \
    sharex-upload-server

and docker logs

chchang@hqdc039:~/docker/ShareX-Upload-Server$ docker logs -f sharex-upload-server 
linkify option is removed. Use linkify plugin instead:

import Remarkable from 'remarkable';
import linkify from 'remarkable/linkify';
new Remarkable().use(linkify)


  ======================================================================
  |  ________  ___  ___  ________  ________  _______   ________        |
  | |\   ____\|\  \|\  \|\   __  \|\   __  \|\  ___ \ |\   ____\       |
  | \ \  \___|\ \  \\\  \ \  \|\  \ \  \|\  \ \   __/|\ \  \___|_      |
  |  \ \_____  \ \   __  \ \   __  \ \   _  _\ \  \_|/_\ \_____  \     |
  |   \|____|\  \ \  \ \  \ \  \ \  \ \  \\  \\ \  \_|\ \|____|\  \    |
  |     ____\_\  \ \__\ \__\ \__\ \__\ \__\\ _\\ \_______\____\_\  \   |
  |    |\_________\|__|\|__|\|__|\|__|\|__|\|__|\|_______|\_________\  |
  |    \|_________|                                      \|_________|  |
  |                                                                    |
  |                                                                    |
  ======================================================================
  |  Creator: github.com/TannerReynolds                                |
  |  Discord: https://discord.gg/QTcU89d                               |
  ======================================================================
  |> [5:55:19 AM] | Connecting to Discord...
  |> [5:55:19 AM] | Secure server listening on port 443
  |> [5:55:19 AM] | Server using flexible SSL secure setting
To run a full SSL setting, ensure key.pem and cert.pem are in the /src folder
  |> [5:55:19 AM] | Loaded Command: banIP.js
  |> [5:55:19 AM] | Loaded Command: deleteFile.js
  |> [5:55:19 AM] | Loaded Command: eval.js
  |> [5:55:19 AM] | Loaded Command: exec.js
  |> [5:55:19 AM] | Loaded Command: help.js
  |> [5:55:19 AM] | Loaded Command: recentVisitors.js
  |> [5:55:19 AM] | Loaded Command: rename.js
  |> [5:55:19 AM] | Loaded Command: restart.js
  |> [5:55:19 AM] | Loaded Command: trafficfor.js
  |> [5:55:19 AM] | Loaded Command: unbanIP.js

and then nothing happened .
can't open the web in http/https
and no more log messages.

ShareS Version

Docker version

Desktop (please complete the following information):

  • OS: ubuntu 20.04
  • Browser : Firefox
  • Version : 89.0.1

Can'play some files

mp3, mp4, m4a have errors so when I uploaded the files they didn't work, according to mp3 they can't play, and mp4 downloaded without indicating its type so it can't play.

Not Starting

I've been using this for a while now and I've never had a problem starting it until now. Whenever I start my server it says Continuing without Discord connection... but never continues.

Navbar

Navbar not working on the phone, so when I click it doesn't give me anything

Background of .txt files makes it almost unreadable

Is your feature request related to a problem? Please describe.
When looking at a txt file Click Me! its almost impossible to read it due to gray on black text. But the issue doesn't happen for .md files. Example

Describe the solution you'd like
Make .txt files like .md files. (Readable)

Describe alternatives you've considered
Color Picker for Theme and or background colors

docker terminated with NODULE_NOT_FOUND error

Describe the bug
docker terminated with NODULE_NOT_FOUND error

To Reproduce
Steps to reproduce the behavior:

  1. docker build -t sharex-upload-server .
  2. docker run --name "sharex-upload-server" -d -v $(pwd)/src/config.json:/usr/src/app/config.json -v $(pwd)/src/db.json:/usr/src/app/db.json -v $(pwd)/src/server/uploads/:/usr/src/app/server/uploads/ -p 8181:80 -p 44304:443 sharex-upload-server

Desktop (please complete the following information):

  • OS: ubuntu 18.04
  • Browser : Firefox

Additional context
Dockerfile

2021-04-20 08:32:08 [changch@hqdc034 ShareX-Upload-Server]$ cat Dockerfile 
FROM node:alpine

WORKDIR /usr/src/app
COPY src .
COPY package.json .

RUN apk --no-cache add exiftool && \
    npm i

EXPOSE 80 443
CMD ["node", "index.js"]

docker build log

2021-04-20 08:35:27 [changch@hqdc034 ShareX-Upload-Server]$ docker build -t sharex-upload-server .
Sending build context to Docker daemon  51.02MB
Step 1/7 : FROM node:alpine
 ---> 75631da67663
Step 2/7 : WORKDIR /usr/src/app
 ---> Using cache
 ---> 3509c4e7f7c2
Step 3/7 : COPY src .
 ---> 24adb30b7eaf
Step 4/7 : COPY package.json .
 ---> 63bf2db75f8e
Step 5/7 : RUN apk --no-cache add exiftool &&     npm i
 ---> Running in 5d54d764fd52
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
(1/4) Installing libbz2 (1.0.8-r1)
(2/4) Installing perl (5.30.3-r0)
(3/4) Installing perl-image-exiftool (11.79-r0)
(4/4) Installing exiftool (11.79-r0)
Executing busybox-1.31.1-r10.trigger
OK: 58 MiB in 20 packages

added 269 packages, and audited 270 packages in 14s

42 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm notice 
npm notice New minor version of npm available! 7.7.6 -> 7.10.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.10.0>
npm notice Run `npm install -g [email protected]` to update!
npm notice 
Removing intermediate container 5d54d764fd52
 ---> a9701460b9a6
Step 6/7 : EXPOSE 80 443
 ---> Running in b867ae5502ac
Removing intermediate container b867ae5502ac
 ---> 5476bbd24b34
Step 7/7 : CMD ["node", "index.js"]
 ---> Running in f8164722d9c3
Removing intermediate container f8164722d9c3
 ---> 72407ede49b3
Successfully built 72407ede49b3
Successfully tagged sharex-upload-server:latest

start docker with

docker run --name "sharex-upload-server" -d -v $(pwd)/src/config.json:/usr/src/app/config.json -v $(pwd)/src/db.json:/usr/src/app/db.json -v $(pwd)/src/server/uploads/:/usr/src/app/server/uploads/ -p 8181:80 -p 44304:443 sharex-upload-server

and docker immediately terminated with error

2021-04-20 08:42:40 [changch@hqdc034 ShareX-Upload-Server]$ docker logs sharex-upload-server 
node:internal/modules/cjs/loader:927
  throw err;
  ^

Error: Cannot find module '/usr/src/app/index.js'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15)
    at Function.Module._load (node:internal/modules/cjs/loader:769:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

robots.txt

Discord is not embedding with https, i think it needs a robots.txt but i am not sure

No Input Filtering for Discord

Describe the bug
When using the discord integration, using [prefix]rv will display the 10 most recent visited pages. if you send a crafted payload, you can do things like ping everyone.

To Reproduce
Steps to reproduce the behavior:

  1. curl https://[DOMAIN]/```@everyone - ``` breaks out of the code block, @everyone is just a PoC ping
  2. run [prefix]rv
  3. See injectionon

Expected behavior
Strip or Escaped characters so that this can't happen

ShareS Version
4.5.3

Screenshots

Set data folder

I would like to be able to set the data folder to something else than the default. I'm running this in a VM and I'd enjoy being able to instead send it to a Shared Folder.

Is this something that would be reasonable?

docker issue

So, I'm attempting to run this in a docker container. It works as expected in a container, but if I attempt to mount 'uploads' to a host directory (i.e. -v /path/to/host/uploads:/sharex/uploads), I then get an error when I attempt to upload files

sharex-server_1  | TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string or Buffer. Received type object
sharex-server_1  |     at write_ (_http_outgoing.js:601:11)
sharex-server_1  |     at ServerResponse.write (_http_outgoing.js:573:10)
sharex-server_1  |     at fs.rename.err (/sharex/app.js:301:32)
sharex-server_1  |     at FSReqWrap.oncomplete (fs.js:145:20)

Any ideas?

If it's helpful, my Dockerfile is

from node:alpine

RUN apk add --no-cache git
RUN git clone https://github.com/TannerReynolds/node-sharex-server /sharex

WORKDIR /sharex

RUN npm install
RUN npm install -g pm2

VOLUME ["/sharex/pages", "/sharex/uploads"]

EXPOSE 80

cmd ["pm2-docker", "start", "app.js"]

Edit:

Okay. I figured it out. the actual error is:

{ [Error: EXDEV: cross-device link not permitted, rename '/tmp/upload_20130982b474a921caed4722c2fbba20' -> './uploads/MFA6Y9.png']
sharex-server_1  |   errno: -18,
sharex-server_1  |   code: 'EXDEV',
sharex-server_1  |   syscall: 'rename',
sharex-server_1  |   path: '/tmp/upload_20130982b474a921caed4722c2fbba20',
sharex-server_1  |   dest: './uploads/MFA6Y9.png' }

After some googling, I installed fs-extra and replaced all instances of fs.rename with fs.move, which seems to have fixed the problem with Docker.

meteor/meteor#7852 (comment)

Calling rename(2) for a directory is not fully supported on AUFS.  It returns EXDEV 
(“cross-device link not permitted”),  even when both of the source and the destination path
are on a same AUFS layer, unless the directory  has no children.  So your application has to 
be designed so that it can handle  EXDEV and fall back to a “copy and unlink” strategy.

That said, the fs-extra npm package has the fs.move method which implements error handling 
for that EXDEV error. It has moveDirAcrossDevice and moveFileAcrossDevice methods that 
presumably fix it.

Gallery Admin Key Refused

Describe the bug
When attempting to access the gallery using the admin key. It returns unauthorized.

To Reproduce
Steps to reproduce the behavior:

  1. Install latest version of the repo
  2. Configure server settings
  3. Configure admin key
  4. Start server
  5. Go to yourdomain.com/gallery
  6. Input admin key

Expected behavior
When inputting a valid admin key, it should return the gallery page

ShareS Version
v4.5.3

Screenshots
https://cdn.sigmabot.xyz/lTW7pL

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Firefox
  • Version: 77.0.1

Smartphone (please complete the following information):

  • Device: N/A
  • OS: N/A
  • Browser: N/A
  • Version: N/A

Additional context
None

Can't install

Describe the bug

1|cdn-padow |     at Module._compile (node:internal/modules/cjs/loader:1101:14)
1|cdn-padow |     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
1|cdn-padow |     at Module.load (node:internal/modules/cjs/loader:981:32)
1|cdn-padow |     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
1|cdn-padow |     at Module.require (node:internal/modules/cjs/loader:1005:19)
1|cdn-padow |     at Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:80:39) {
1|cdn-padow |   code: 'MODULE_NOT_FOUND',
1|cdn-padow |   requireStack: [
1|cdn-padow |     '/var/www/cdn-padow/src/server/routes/files.js',
1|cdn-padow |     '/var/www/cdn-padow/src/server/routes/index.js',
1|cdn-padow |     '/var/www/cdn-padow/src/server/app.js',
1|cdn-padow |     '/var/www/cdn-padow/src/index.js'
1|cdn-padow |   ]
1|cdn-padow | }

To Reproduce

  1. Install fresh version of the upload server
  2. Run the script
  3. Run the index.js

Expected behavior
It should start

ShareS Version
4.5.3

Desktop

  • OS: Ubuntu 20.04
  • Browser: chrome
  • Version: don't get it

Additional context
Running npm i just gets an another error, even if I'm root and the folder's perms are -R 777

npm ERR! syscall symlink
npm ERR! path ../acorn/bin/acorn
npm ERR! dest /var/www/cdn-padow/node_modules/.bin/acorn
npm ERR! errno -1
npm ERR! Error: EPERM: operation not permitted, symlink '../acorn/bin/acorn' -> '/var/www/cdn-padow/node_modules/.bin/acorn'
npm ERR!  [Error: EPERM: operation not permitted, symlink '../acorn/bin/acorn' -> '/var/www/cdn-padow/node_modules/.bin/acorn'] {
npm ERR!   errno: -1,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'symlink',
npm ERR!   path: '../acorn/bin/acorn',
npm ERR!   dest: '/var/www/cdn-padow/node_modules/.bin/acorn'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user

gallery not working.

Describe the bug
gallery doesnt work. Just tries to load then fails after about 2 - 3mins

To Reproduce
Just run the latest version of this and try and access the gallery

Expected behavior
To show screenshots, etc

ShareS Version
Latest

Desktop (please complete the following information):

  • OS: Windows 10 (Will all latest updates)
  • Browser Google Chrome
  • Version 80.0.3987.132

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.