Austin d56882e535 spacing is for nerds | %!s(int64=7) %!d(string=hai) anos | |
---|---|---|
controllers | %!s(int64=7) %!d(string=hai) anos | |
database | %!s(int64=7) %!d(string=hai) anos | |
pages | %!s(int64=7) %!d(string=hai) anos | |
public | %!s(int64=7) %!d(string=hai) anos | |
routes | %!s(int64=7) %!d(string=hai) anos | |
.eslintrc.json | %!s(int64=7) %!d(string=hai) anos | |
.gitignore | %!s(int64=7) %!d(string=hai) anos | |
README.md | %!s(int64=7) %!d(string=hai) anos | |
config.sample.js | %!s(int64=7) %!d(string=hai) anos | |
lolisafe.js | %!s(int64=7) %!d(string=hai) anos | |
package.json | %!s(int64=7) %!d(string=hai) anos |
Pomf-like image uploading service, written in NodeJS
config.sample.js
to config.js
npm install
to install all dependenciespm2 start lolisafe.js
or node lolisafe.js
to start the serviceThis service supports running both as public and private. The only difference is that one needs a token and the other one doesn't. If you want it to be public so anyone can upload files either from the website or API, just leave the token empty on the config file.
But if you want to run it privately, you need to specify a random string, which you'll need to provide in every API call as a header called auth
.
Once the service starts, you can start hitting the upload endpoint at /api/upload
.
When sending a file to it, be sure the form name is set to file
, and if the app you're using asks, the type of form is multipart/form-data
. Once the request has been made, if everything goes smoothly you should be receiving a json with the key url
. Sample:
{
"url": "https://i.kanacchi.moe/pqkI.png"
}
This service works great with apps like ShareX, since it's a lot like cuntflaps.me or mixtape.moe.
A chrome extension to be able to right click
images -> send to safe
is in the works.
If you are using nginx, you should set inside your location block the following directive, replacing the number with the one you want set up client_max_body_size 512M;
If using apache, you should change the following directives on your config RLimitMEM 512M