This is an API, to have something similar to Google Cloud locally, so you can later complement it with a frontend.
//using npm
npm install
//using pnpm
pnpm install
Open .env-example and copy its content into a new file named .env, then set the correct value for HOME_CLOUD_STORAGE.
//using npm
npm run build
//using pnpm
pnpm build
//using npm
npm run start
//using pnpm
pnpm star
GET /api/content/path?
Return what is in the current directory.
In a URL, the slash "/" is used to separate the different sections of a web address and to indicate the path to a file or directory on the web server. That is why in this case we opted to use "--", later changed to "//" to access the folder in Windows or "/" in Linux.
POST /api/dir/path?
Body | Type | Description |
---|---|---|
name |
string |
Required |
To create folders is a simple way, let's follow the path above, within this we want to create a folder.
POST /api/dir/amigos--pollos--familly
POST /api/upload/path?
Body | Type | Description |
---|---|---|
file |
file |
Form Data |
POST /api/upload/amigos--pollos--familly
GET /api/download/path?
GET /api/download/amigos--pollos--familly--gus.png
POST /api/img/path?
It is not limited to images and videos, you can also view PDFs among many multimedia files.
POST /api/img/amigos--pollos--familly--gus.png
DELETE /api/delete/path?
DELETE /api/delete/amigos--pollos--familly--gus.png
PUT /api/rename/path?
Body | Type | Description |
---|---|---|
name |
string |
Raw Json |
PUT /api/rename/amigos--pollos--familly--gus.png