TrueWinter

NodeUpload Production Ready Release

| Reading Time:

For quite a while now, I have been working on a file sharing Node.JS app called NodeUpload. At version 4 of NodeUpload, I decided that it seemed stable enough after fixing a bug to be marked as production ready. Please note that even though I would consider it production ready, there may still be some issues that you can submit as an issue on GitHub. Now that it is in version 5, I thought that it would be a good time to write a blog post.

You probably have some questions about NodeUpload…

What is this?

NodeUpload is a Node.js server application that lets you run your own private file upload service. It uses randomly generated tokens for upload authentication and includes some admin features that require an admin token (which are generated when running createUser.js and answering true to the Admin question).

Does it have support for ShareX?

Yes it does! Please look at the ShareX section of the docs for more details.

How are uploads done?

When a user uploads a file, it will be stored in a directory in your operating system’s temp directory. Then there will be a connection to the database to check that the token is valid. If it is valid, the file gets moved to the files directory in the app’s directory.

How are tokens generated?

Tokens generated are not based on any information given when running createUser.js. The information there is only used to be stored in the database. The token is generated by the uuid module (uuid/v4) to generate a completely random token.

What is the difference between a token and an admin token?

A token (or upload token) is used for uploading files where an admin token is used for things like deleting files. An admin token cannot be used to upload and an upload token cannot be used for admin actions.

Why can a user with an admin token still do admin actions after their token has been disabled.

Currently there is not a check for enabled accounts when doing admin actions. Uploads for disabled accounts will still be blocked however admin actions won’t.

Does it check for information already existing in the database when running createUser.js?

Yes, this feature has been added.

Is there any way to change the port that it runs on?

To change the port that NodeUpload runs on, edit the config file (config.json).

Is there any way to change the length of the generated file names of uploads?

To change the length of the auto generated file names of uploads, edit the config file (config.json).

Is there any way to change the responses (console output, web responses, etc.)?

Yes, there is. Edit the strings.json file. The placeholders (``) in these cannot be used in all strings. The code will have to be changed if you want to add these into strings that do not have support for it. Please see the docs for more details.

Can I contribute to the development of NodeUpload by opening pull requests?

Yes, you can open a pull request but please use the format here

I found a bug, how do I report it?

To report a bug, open an issue using the format here

Can I request a feature?

Yes, I am open to feedback and feature requests. Just open an issue using the format here

Why was NodeUpload only ‘production ready’ in version 4.0.0?

Decided not to use v0.x.x as the development version numbers as NodeUpload was probably production ready with a few changes to the code. Other reason: I don’t actually know why I did it like this… ¯\_(ツ)_/¯

For more info, please go to the NodeUpload GitHub repository


Comments

Leave a comment

Please note that some comments may require moderation, as determined by Akismet. Read their privacy policy to learn more about how they process your data.

Your email address will be used to show a Gravatar image, but will not be published
0/2000