MyStorage - is a very useful application for hosting and easy to manage your files in S3 buckets. You can upload, delete or search your files just using the interface application.
- Pnpm installed (
npm i pnpm -g
). - Node.js >= v16 (Not tested in older versions, but maybe it's work).
- PostgreSQL database.
- Any S3 hosting See free S3 list.
- Clone this repository:
git clone https://github.com/LWJerri/MyStorage.git
. - Install Node.js requirements
pnpm install
. - Rename
.env.example
inapps/backend
folder to.env
. - Setup your
.env
file. - Build production code
pnpm -r build
. - Run builded code, just type
pnpm start
. - Open website -
localhost:3005
.
Main problem
Some object storages support only temp links and don't provide a live link to files. I faced this problem when trying to connect StorJ storage and resolved this problem by just writing the file id to Redis and regenerating it when key time expires.Unfortunate, it's terrible, I removed this feature with Redis and recommend you choose another object storage service.
CORS error: You can't download your uploaded file and see in the console CORS error. Some buckets require edit CORS privacy to direct download files
Fix for Scaleway
Setup AWS CLI & cors.json:-
Create
cors.json
file with CORS rules on desktop. -
Install AWS CLI click.
-
Setup your AWS-CLI:
aws configure
. -
Apply
cors.json
to your S3 bucketaws s3api put-bucket-cors --bucket=BUCKETNAME --cors-configuration=file://cors.json --endpoint-url=S3_BUCKET_URL
CORS JSON
{
"CORSRules": [
{
"AllowedHeaders": ["*"],
"AllowedMethods": ["GET", "HEAD", "POST", "PUT", "DELETE"],
"AllowedOrigins": ["*"],
"ExposeHeaders": ["Etag"],
"MaxAgeSeconds": 3000
}
]
}
- Simple auth system, support multi accounts.
- Accont & display uploads manage panel.
- Upload, search and deleting files.
- Add, remove, edit tags for uploaded files.
- Change column type for uploaded files.
- ...other features will be added soon.
MyStorage has localization support. Actual list with available languages at this moment:
- English
- Ukrainian
- Russian
Anyone can open a pull request and suggest new translating or fix already exists localizations.
This project opened for contribution and any suggestions! You can create a new Issue
or make an Pull request
with your code changes.
This code has MIT license. See the LICENSE
file for getting more information.