Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
fe3dd25bc3 | |||
5b09209ef9 | |||
62db650e3c | |||
b847886254 |
@ -10,7 +10,7 @@ Misskeyサーバーの構築にご関心をお寄せいただきありがとう
|
|||||||
|
|
||||||
*1.* Misskeyユーザーの作成
|
*1.* Misskeyユーザーの作成
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
Misskeyのrootで実行しない方がよいため、代わりにユーザーを作成します。
|
Misskeyはrootユーザーで実行しない方がよいため、代わりにユーザーを作成します。
|
||||||
Debianの例:
|
Debianの例:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"author": "syuilo <i@syuilo.com>",
|
"author": "syuilo <i@syuilo.com>",
|
||||||
"version": "8.34.3",
|
"version": "8.34.4",
|
||||||
"clientVersion": "1.0.9572",
|
"clientVersion": "1.0.9572",
|
||||||
"codename": "nighthike",
|
"codename": "nighthike",
|
||||||
"main": "./built/index.js",
|
"main": "./built/index.js",
|
||||||
|
@ -36,8 +36,11 @@ async function save(path: string, name: string, type: string, hash: string, size
|
|||||||
|
|
||||||
if (config.drive && config.drive.storage == 'minio') {
|
if (config.drive && config.drive.storage == 'minio') {
|
||||||
const minio = new Minio.Client(config.drive.config);
|
const minio = new Minio.Client(config.drive.config);
|
||||||
const key = `${config.drive.prefix}/${uuid.v4()}/${encodeURIComponent(name)}`;
|
|
||||||
const thumbnailKey = `${config.drive.prefix}/${uuid.v4()}/${encodeURIComponent(name)}.thumbnail.jpg`;
|
const keyDir = `${config.drive.prefix}/${uuid.v4()}`;
|
||||||
|
const key = `${keyDir}/${name}`;
|
||||||
|
const thumbnailKeyDir = `${config.drive.prefix}/${uuid.v4()}`;
|
||||||
|
const thumbnailKey = `${thumbnailKeyDir}/${name}.thumbnail.jpg`;
|
||||||
|
|
||||||
const baseUrl = config.drive.baseUrl
|
const baseUrl = config.drive.baseUrl
|
||||||
|| `${ config.drive.config.useSSL ? 'https' : 'http' }://${ config.drive.config.endPoint }${ config.drive.config.port ? `:${config.drive.config.port}` : '' }/${ config.drive.bucket }`;
|
|| `${ config.drive.config.useSSL ? 'https' : 'http' }://${ config.drive.config.endPoint }${ config.drive.config.port ? `:${config.drive.config.port}` : '' }/${ config.drive.bucket }`;
|
||||||
@ -61,8 +64,8 @@ async function save(path: string, name: string, type: string, hash: string, size
|
|||||||
key: key,
|
key: key,
|
||||||
thumbnailKey: thumbnailKey
|
thumbnailKey: thumbnailKey
|
||||||
},
|
},
|
||||||
url: `${ baseUrl }/${ key }`,
|
url: `${ baseUrl }/${ keyDir }/${ encodeURIComponent(name) }`,
|
||||||
thumbnailUrl: thumbnail ? `${ baseUrl }/${ thumbnailKey }` : null
|
thumbnailUrl: thumbnail ? `${ baseUrl }/${ thumbnailKeyDir }/${ encodeURIComponent(name) }.thumbnail.jpg` : null
|
||||||
});
|
});
|
||||||
|
|
||||||
const file = await DriveFile.insert({
|
const file = await DriveFile.insert({
|
||||||
|
Reference in New Issue
Block a user