{"id":26337139,"url":"https://github.com/truewinter/nodeupload-s3","last_synced_at":"2025-03-16T02:17:49.938Z","repository":{"id":46022312,"uuid":"244121186","full_name":"TrueWinter/nodeupload-s3","owner":"TrueWinter","description":"S3 version of NodeUpload (which allows you to run your own file hosting service)","archived":false,"fork":false,"pushed_at":"2022-10-05T16:19:37.000Z","size":854,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-05-02T02:58:05.650Z","etag":null,"topics":["file-hosting","file-sharing","image-sharing","sharex","sharex-server"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TrueWinter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-01T09:29:48.000Z","updated_at":"2024-05-02T02:58:05.651Z","dependencies_parsed_at":"2023-01-19T06:45:58.200Z","dependency_job_id":null,"html_url":"https://github.com/TrueWinter/nodeupload-s3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrueWinter%2Fnodeupload-s3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrueWinter%2Fnodeupload-s3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrueWinter%2Fnodeupload-s3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrueWinter%2Fnodeupload-s3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TrueWinter","download_url":"https://codeload.github.com/TrueWinter/nodeupload-s3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814895,"owners_count":20352038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["file-hosting","file-sharing","image-sharing","sharex","sharex-server"],"created_at":"2025-03-16T02:17:49.439Z","updated_at":"2025-03-16T02:17:49.932Z","avatar_url":"https://github.com/TrueWinter.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NodeUpload S3\n\nNodeUpload S3 is a version of [NodeUpload](https://github.com/TrueWinter/nodeupload) that allows you to use S3 to store files. It uses randomly generated file names and ensures that a file name is unique before uploading files.\n\nThe list of files in S3 are only retrieved when NodeUpload starts up. Therefore, it is important that the directory you use for uploads (`s3.remotePath` in the config) is only used by NodeUpload. Do not manually add or remove files from this directory without restarting NodeUpload.\n\n## Installing\n\n```sh\nnpm install\nnano config.json # Configure NodeUpload (you can use something other than nano for this)\nnode createUser.js # This is the script for creating users\nnode app.js\n```\n\nFor production use, it is recommended that you use a process manager such as PM2.\n\n## Configuration\n\nRename `config.json.example` to `config.json` and then modify the settings as required:\n\n| Option | Description | Required |\n|---     |---          |---       |\n| filenameLength | How long the generated file name will be | Y |\n| port | The port that NodeUpload S3 runs on | Y |\n| indexForm | If the online upload form should be shown | Y |\n| indexFormDisabledMessage | The message that is shown if the online upload form is disabled | N\\* |\n| extBlacklist | Files with these extensions will not be allowed | Y |\n| ratelimitAfter | After this many requests in the `ratelimitTime`, rate limit requests | Y |\n| ratelimitTime | See `ratelimitAfter` description | Y |\n| logs.enable | If logs are enabled | Y |\n| logs.dir | The directory that logs will be saved in | N\\*\\* |\n| logs.file | The file that logs will be saved in | N\\*\\* |\n| logs.format | Log format | Y |\n| s3.bucket | S3 bucket | Y |\n| s3.s3_endpoint | S3 endpoint | Y |\n| s3.s3_accessKeyId | S3 access key | Y |\n| s3.s3_secretAccessKey | S3 secret key | Y |\n| s3.s3_region | S3 region | Y |\n| s3.remotePath | If you want the files to be uploaded to a different folder on S3 | N |\n| s3.redirectToAfterUpload | If you want users to be redirected to the URL of their file, insert that URL here | N |\n\n\\* Required if `indexForm` is set to `true`\n\n\\*\\* These are required if `logs.enable` is set to `true`\n\n## Creating a New User\nTo create a new user, run the following command and answer the questions.\n\n```sh\nnode createUser.js\n```\n\n## Usage\n\nIf the server is not already started, run `node app.js`.\nOnce the server has started, open a web browser to `YOUR_IP:PORT` (where `PORT` is the port specified in the config file (`config.json`)).\n\nIf everything worked, it should show an upload form (unless disabled in the config file). Just add your token where it says `Token`, choose a file to upload, then click the button. It should upload. If not, check the console for errors. You may need to open an issue here.\n\nShareX is also supported. Download `nodeupload.sxcu` to your computer and double click it. This should import the uploader config into ShareX. You will then need to go to the custom uploader settings (Destinations -\u003e Custom uploader settings) and modify the uploader as needed.\n\n![Usage GIF](docs/assets/img/usage.gif)\n\nSome file extensions are blacklisted by default. These can be changed in the config file.\n- .exe\n- .html\n- .htm\n- .bat\n- .cmd\n- .sh\n\n## FAQs\n\n  \u003e What is this?\n\n  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.\n\n  \u003e How are uploads done?\n\n  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 uploaded to S3 using a randomly generated file name.\n\n  \u003e How are tokens generated?\n\n  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 for your convenience. The token is generated by the [`uuid` module](https://www.npmjs.com/package/uuid) (`uuid/v4`) to generate a completely random token.\n\n  \u003e Does it check for information already existing in the database when running `createUser.js`?\n\n  Yes, this feature has been added.\n\n  \u003e Is there any way to change the port that it runs on?\n\n  To change the port that NodeUpload runs on, edit the config file (`config.json`).\n\n  \u003e Is there any way to change the length of the generated file names of uploads?\n\n  To change the length of the auto generated file names of uploads, edit the config file (`config.json`).\n\n  \u003e Is there any way to change the responses (console output, web responses, etc.)?\n\n  Yes, there is. Edit the `strings.json` file. The placeholders (`{{placeholder}}`) 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. Note that not all strings can be changed. Please see [the docs](https://nodeupload.truewinter.dev) for more details.\n\n  \u003e Can I contribute to the development of NodeUpload by opening pull requests?\n\n  Yes, you can open a pull request but please use the format [here](https://github.com/TrueWinter/nodeupload-s3/blob/master/PULL_REQUESTS.md)\n\n  \u003e I found a bug, how do I report it?\n\n  To report a bug, open an issue using the format [here](https://github.com/TrueWinter/nodeupload-s3/blob/master/BUGS.md)\n\n  \u003e Can I request a feature?\n\n  Yes, I am open to feedback and feature requests. Just open an issue using the format [here](https://github.com/TrueWinter/nodeupload-s3/blob/master/FEATURE_REQUESTS.md)\n\n## LICENSE\nMIT License\n\nCopyright (c) 2020 TrueWinter\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftruewinter%2Fnodeupload-s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftruewinter%2Fnodeupload-s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftruewinter%2Fnodeupload-s3/lists"}