Pitu 7 éve
szülő
commit
de975f0f62
2 módosított fájl, 57 hozzáadás és 5 törlés
  1. 14 5
      README.md
  2. 43 0
      config.sample.js

+ 14 - 5
README.md

@@ -1,7 +1,16 @@
-<<<<<<< HEAD
 # loli-bank
 Pomf-like image uploading service, written in NodeJS
-=======
-# loli-safe
-Pomf-like file uploading service, written in NodeJS
->>>>>>> b285f244150d0eb79376716501a97b9416497344
+
+---
+1. Clone
+2. Rename `config.sample.js` to `config.js`
+3. Modify port and prvacy options if desired
+4. run `npm install` to install all dependencies
+5. run `node lolisafe.js` to start the service
+
+---
+## Using it
+After the service is started, you can POST files to /api/upload . The file key needs to be called `file` and it should be a `multipart/form-data` upload, or else it will be disregarded.
+
+This works great with sharex, just like [mixtape.moe](https://mixtape.moe) and [cuntflaps.me](https://cuntflaps.me).
+A chrome extension to be able to right click images -> send to safe is in the works.

+ 43 - 0
config.sample.js

@@ -0,0 +1,43 @@
+module.exports = {
+
+	// Port on which to run the server
+	port: 9999,
+
+	// Upload restrictions
+	privacy: {
+
+		// Is the service public? If so, anyone with the URL can upload files
+		public: false,
+
+		// If not, which IP's should be able to access?
+		IPs: [
+			'::1',
+			'127.0.0.1'
+		]
+	},
+
+	// Uploads config
+	uploads: {
+
+		// Folder where images should be stored
+		folder: 'uploads',
+
+		// Max file size allowed
+		maxsize: '512MB'
+	},
+
+	// Folder where to store logs
+	logsFolder: 'logs',
+
+	// The length of the random generated name for the uploaded files
+	fileLength: 4,
+
+	// The following values shouldn't be touched
+	database: {
+		client: 'sqlite3',
+		connection: {
+			filename: './db'
+		},
+		useNullAsDefault: true
+	}
+}