Compare commits
13 Commits
feature/ty
...
master
Author | SHA1 | Date |
---|---|---|
Pitu | 9367eb5eb8 | |
Pitu | 6cf87b95ec | |
Andy Chan | fcd9b7797f | |
Pitu | f8d763dca3 | |
Brandon Dusseau | 556dfbd5f5 | |
Jason | 25897ba6d3 | |
Kana | 58864852d1 | |
Kana | f262fa8069 | |
Pitu | ff046169bf | |
Pitu | 63016a5b74 | |
Zephyrrus | a8b985240d | |
Kana | 0d36d03db6 | |
Devices | 45ae83d60c |
|
@ -60,7 +60,6 @@ server {
|
|||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_redirect off;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
As you are aware by now chibisafe is a project meant to be self-hosted and so we've compiled the list below of sites using it. Some of them are open for registration and some might even offer anonymous uploads.
|
||||
|
||||
- [chibisafe.moe](https://chibisafe.moe): A small safe worth protecting.
|
||||
- [safe.fiery.me](https://safe.fiery.me): Just another clone. *(v3)*
|
||||
- [dmca.gripe](https://dmca.gripe): a dmca-resistant, permanent file hosting service. *(v3)*
|
||||
- [safe.succmy.wang](https://safe.succmy.wang): A private clone with a ~~funny~~ bad name
|
||||
- [discordjs.moe](https://discordjs.moe): A まじ卍 as fuck copy of lolisafe.moe
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -74,7 +74,7 @@
|
|||
"rotating-file-stream": "^2.1.3",
|
||||
"search-query-parser": "^1.5.5",
|
||||
"serve-static": "^1.13.2",
|
||||
"sharp": "^0.27.0",
|
||||
"sharp": "^0.29.0",
|
||||
"sqlite3": "^5.0.0",
|
||||
"systeminformation": "^4.34.5",
|
||||
"uuid": "^3.3.2",
|
||||
|
@ -102,11 +102,11 @@
|
|||
"eslint-plugin-vue": "^5.2.1",
|
||||
"jest": "^26.6.3",
|
||||
"jest-serializer-vue": "^2.0.2",
|
||||
"node-sass": "^5.0.0",
|
||||
"nodemon": "^1.19.4",
|
||||
"postcss-css-variables": "^0.11.0",
|
||||
"postcss-nested": "^3.0.0",
|
||||
"puppeteer": "^5.5.0",
|
||||
"sass": "^1.48.0",
|
||||
"sass-loader": "^10.1.0",
|
||||
"vue-jest": "^3.0.7"
|
||||
},
|
||||
|
|
|
@ -3,7 +3,7 @@ const Route = require('../../structures/Route');
|
|||
|
||||
class albumPOST extends Route {
|
||||
constructor() {
|
||||
super('/album/new', 'post');
|
||||
super('/album/new', 'post', { canApiKey: true });
|
||||
}
|
||||
|
||||
async run(req, res, db, user) {
|
||||
|
|
|
@ -4,7 +4,7 @@ const Util = require('../../utils/Util');
|
|||
|
||||
class albumsGET extends Route {
|
||||
constructor() {
|
||||
super('/albums/mini', 'get');
|
||||
super('/albums/mini', 'get', { canApiKey: true });
|
||||
}
|
||||
|
||||
async run(req, res, db, user) {
|
||||
|
|
|
@ -3,7 +3,7 @@ const Util = require('../../../utils/Util');
|
|||
|
||||
class linkPOST extends Route {
|
||||
constructor() {
|
||||
super('/album/link/new', 'post');
|
||||
super('/album/link/new', 'post', { canApiKey: true });
|
||||
}
|
||||
|
||||
async run(req, res, db, user) {
|
||||
|
|
|
@ -2,7 +2,7 @@ const Route = require('../../structures/Route');
|
|||
|
||||
class albumAddPOST extends Route {
|
||||
constructor() {
|
||||
super('/file/album/add', 'post');
|
||||
super('/file/album/add', 'post', { canApiKey: true });
|
||||
}
|
||||
|
||||
async run(req, res, db, user) {
|
||||
|
|
|
@ -21,7 +21,8 @@ class configGET extends Route {
|
|||
metaThemeColor: Util.config.metaThemeColor,
|
||||
metaDescription: Util.config.metaDescription,
|
||||
metaKeywords: Util.config.metaKeywords,
|
||||
metaTwitterHandle: Util.metaTwitterHandle
|
||||
metaTwitterHandle: Util.metaTwitterHandle,
|
||||
domain: process.env.DOMAIN
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ const ThumbUtil = require('../utils/ThumbUtil');
|
|||
const oldDb = require('knex')({
|
||||
client: 'sqlite3',
|
||||
connection: {
|
||||
filename: nodePath.join(__dirname, '../../', 'db')
|
||||
filename: nodePath.join(__dirname, '../../../', 'db')
|
||||
},
|
||||
useNullAsDefault: true
|
||||
});
|
||||
|
@ -16,7 +16,7 @@ const oldDb = require('knex')({
|
|||
const newDb = require('knex')({
|
||||
client: 'sqlite3',
|
||||
connection: {
|
||||
filename: nodePath.join(__dirname, '../../database/', 'database.sqlite')
|
||||
filename: nodePath.join(__dirname, '../../../database/', 'database.sqlite')
|
||||
},
|
||||
postProcessResponse: result => {
|
||||
const booleanFields = ['enabled', 'enableDownload', 'isAdmin', 'nsfw', 'generateZips', 'publicMode', 'userAccounts'];
|
||||
|
@ -42,8 +42,8 @@ const start = async () => {
|
|||
console.log('Starting migration, this may take a few minutes...'); // Because I half assed it
|
||||
console.log('Please do NOT kill the process. Wait for it to finish.');
|
||||
|
||||
await jetpack.removeAsync(nodePath.join(__dirname, '../../uploads/thumbs'));
|
||||
await jetpack.dirAsync(nodePath.join(__dirname, '../../uploads/thumbs/square'));
|
||||
await jetpack.removeAsync(nodePath.join(__dirname, '../../../uploads/thumbs'));
|
||||
await jetpack.dirAsync(nodePath.join(__dirname, '../../../uploads/thumbs/square'));
|
||||
console.log('Finished deleting old thumbnails to create new ones');
|
||||
|
||||
const users = await oldDb.table('users').where('username', '<>', 'root');
|
||||
|
@ -121,7 +121,7 @@ const start = async () => {
|
|||
}
|
||||
|
||||
const filename = file.name;
|
||||
if (!jetpack.exists(nodePath.join(__dirname, '../../uploads', filename))) continue;
|
||||
if (!jetpack.exists(nodePath.join(__dirname, '../../../uploads', filename))) continue;
|
||||
ThumbUtil.generateThumbnails(filename);
|
||||
}
|
||||
await newDb.batchInsert('files', filesToInsert, 20);
|
||||
|
|
|
@ -289,10 +289,10 @@ class Util {
|
|||
const dbFile = await db.table('files')
|
||||
// eslint-disable-next-line func-names
|
||||
.where(function() {
|
||||
if (user === undefined) {
|
||||
this.whereNull('userId');
|
||||
} else {
|
||||
if (user) {
|
||||
this.where('userId', user.id);
|
||||
} else {
|
||||
this.whereNull('userId');
|
||||
}
|
||||
})
|
||||
.where({
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div
|
||||
:class="{ 'has-files': alreadyAddedFiles }"
|
||||
:class="{ 'has-files': alreadyAddedFiles, }"
|
||||
class="uploader-wrapper">
|
||||
<b-select
|
||||
v-if="loggedIn"
|
||||
|
@ -176,7 +176,7 @@ export default {
|
|||
console.error(file, message, xhr);
|
||||
},
|
||||
async dropzoneChunksUploaded(file, done) {
|
||||
const { data } = await this.$axios.post(`${this.config.baseURL}/upload`, {
|
||||
const { data } = await this.$axios.post('/upload', {
|
||||
files: [{
|
||||
uuid: file.upload.uuid,
|
||||
original: file.name,
|
||||
|
|
|
@ -29,5 +29,12 @@ export const mutations = {
|
|||
state.chunkSize = config.chunkSize;
|
||||
state.publicMode = config.publicMode;
|
||||
state.userAccounts = config.userAccounts;
|
||||
state.URL = config.domain;
|
||||
const lastChar = config.domain.substr(-1);
|
||||
if (lastChar === '/') {
|
||||
state.baseURL = `${config.domain}api`;
|
||||
} else {
|
||||
state.baseURL = `${config.domain}/api`;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue