Tiny Cloud Storage Server
It serves a tiny storage and can be used as a short-term tiny data transfer service and etc.
curl http://jeto.ga/api/tinystorage/guest/source_code.c --data-binary @source_code.c
Upload a file to the server.
wget http://jeto.ga/api/tinystorage/guest/source_code.c
Download it from the server.
http://jeto.ga/api/tinystorage
If it is not available, then send me a mail.
Any auth_key
is acceptable.
1. Download or clone it
git clone https://github.com/kcoms555/tinystorage
2. Go to the tinystorage directory
cd tinystorage
3. Install dependencies
npm install
or
npm install body-parser express read-config async
4. Run Server
node tinystorage.js
POST /{auth_key}/{dict_key}
curl http://jeto.ga/api/tinystorage/guest/mymessage -d "I am tinystorage !"
auth_key
is a key registered to the server. If use_public
option is true, then any value for auth_key
is acceptable.
dict_key
is a dictionary key. Any value for dict_key
is acceptable.
It will upload a message "I am tinystorage !" to the server on '/guest/mymessage'.
Anyone having valid auth_key can upload anything he wants.
HTTP/1.1 200 OK
Date: Sat, 26 Sep 2020 17:39:05 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: Express
GET /{auth_key}/{dict_key}
curl http://jeto.ga/api/tinystorage/guest/mymessage
It will download a message "I am tinystorage !" from the on '/guest/mymessage'.
Anyone having valid auth_key can download anything he needs.
Once data is read, then it will be deleted.
HTTP/1.1 200 OK
Date: Sat, 26 Sep 2020 17:42:16 GMT
Content-Type: application/json
Content-Length: 18
Connection: keep-alive
X-Powered-By: Express
ETag: W/"12-Y5fDOSAhmtW9uFIFMK1cfvw+/Vo"
I am tinystorage !
HTTP 200
: Successfully uploaded or downloaded.
HTTP 201
: Successfully overwritten.
HTTP 400
: auth_key or dict_key or data is not available.
HTTP 500
: Server Internal Error.
Open config.json
and write it as you need.
auth_keys
: A list forauth_key
s. Aauth_key
inauth_keys
is valid whenuse_public
isfalse
.use_public
: if true, anyauth_key
is accepable.port
: A server port.limit
: Limit of data size to upload.
- There is no limit to upload.
- Data that is not read is on the memory as long as the server is alive.
- If the server is closed, there is no way to restore data not read.