aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/files-cache/avatar-permanent-file-cache.ts2
-rw-r--r--server/lib/local-actor.ts2
-rw-r--r--server/lib/object-storage/pre-signed-urls.ts4
-rw-r--r--server/lib/object-storage/urls.ts2
-rw-r--r--server/lib/object-storage/videos.ts10
5 files changed, 10 insertions, 10 deletions
diff --git a/server/lib/files-cache/avatar-permanent-file-cache.ts b/server/lib/files-cache/avatar-permanent-file-cache.ts
index 1d77c5bc1..0c508b063 100644
--- a/server/lib/files-cache/avatar-permanent-file-cache.ts
+++ b/server/lib/files-cache/avatar-permanent-file-cache.ts
@@ -7,7 +7,7 @@ import { AbstractPermanentFileCache } from './shared'
7export class AvatarPermanentFileCache extends AbstractPermanentFileCache<MActorImage> { 7export class AvatarPermanentFileCache extends AbstractPermanentFileCache<MActorImage> {
8 8
9 constructor () { 9 constructor () {
10 super(CONFIG.STORAGE.ACTOR_IMAGES) 10 super(CONFIG.STORAGE.ACTOR_IMAGES_DIR)
11 } 11 }
12 12
13 protected loadModel (filename: string) { 13 protected loadModel (filename: string) {
diff --git a/server/lib/local-actor.ts b/server/lib/local-actor.ts
index 872addc58..611e6d0af 100644
--- a/server/lib/local-actor.ts
+++ b/server/lib/local-actor.ts
@@ -40,7 +40,7 @@ export async function updateLocalActorImageFiles (
40 const extension = getLowercaseExtension(imagePhysicalFile.filename) 40 const extension = getLowercaseExtension(imagePhysicalFile.filename)
41 41
42 const imageName = buildUUID() + extension 42 const imageName = buildUUID() + extension
43 const destination = join(CONFIG.STORAGE.ACTOR_IMAGES, imageName) 43 const destination = join(CONFIG.STORAGE.ACTOR_IMAGES_DIR, imageName)
44 await processImageFromWorker({ path: imagePhysicalFile.path, destination, newSize: imageSize, keepOriginal: true }) 44 await processImageFromWorker({ path: imagePhysicalFile.path, destination, newSize: imageSize, keepOriginal: true })
45 45
46 return { 46 return {
diff --git a/server/lib/object-storage/pre-signed-urls.ts b/server/lib/object-storage/pre-signed-urls.ts
index 313654a57..caf149bb8 100644
--- a/server/lib/object-storage/pre-signed-urls.ts
+++ b/server/lib/object-storage/pre-signed-urls.ts
@@ -15,8 +15,8 @@ export async function generateWebVideoPresignedUrl (options: {
15 const key = generateWebVideoObjectStorageKey(file.filename) 15 const key = generateWebVideoObjectStorageKey(file.filename)
16 16
17 const command = new GetObjectCommand({ 17 const command = new GetObjectCommand({
18 Bucket: CONFIG.OBJECT_STORAGE.VIDEOS.BUCKET_NAME, 18 Bucket: CONFIG.OBJECT_STORAGE.WEB_VIDEOS.BUCKET_NAME,
19 Key: buildKey(key, CONFIG.OBJECT_STORAGE.VIDEOS), 19 Key: buildKey(key, CONFIG.OBJECT_STORAGE.WEB_VIDEOS),
20 ResponseContentDisposition: `attachment; filename=${downloadFilename}` 20 ResponseContentDisposition: `attachment; filename=${downloadFilename}`
21 }) 21 })
22 22
diff --git a/server/lib/object-storage/urls.ts b/server/lib/object-storage/urls.ts
index 84bc1f6c0..d25f84026 100644
--- a/server/lib/object-storage/urls.ts
+++ b/server/lib/object-storage/urls.ts
@@ -10,7 +10,7 @@ function getInternalUrl (config: BucketInfo, keyWithoutPrefix: string) {
10// --------------------------------------------------------------------------- 10// ---------------------------------------------------------------------------
11 11
12function getWebVideoPublicFileUrl (fileUrl: string) { 12function getWebVideoPublicFileUrl (fileUrl: string) {
13 const baseUrl = CONFIG.OBJECT_STORAGE.VIDEOS.BASE_URL 13 const baseUrl = CONFIG.OBJECT_STORAGE.WEB_VIDEOS.BASE_URL
14 if (!baseUrl) return fileUrl 14 if (!baseUrl) return fileUrl
15 15
16 return replaceByBaseUrl(fileUrl, baseUrl) 16 return replaceByBaseUrl(fileUrl, baseUrl)
diff --git a/server/lib/object-storage/videos.ts b/server/lib/object-storage/videos.ts
index 300c1f7e1..891e9ff76 100644
--- a/server/lib/object-storage/videos.ts
+++ b/server/lib/object-storage/videos.ts
@@ -59,7 +59,7 @@ function storeWebVideoFile (video: MVideo, file: MVideoFile) {
59 return storeObject({ 59 return storeObject({
60 inputPath: VideoPathManager.Instance.getFSVideoFileOutputPath(video, file), 60 inputPath: VideoPathManager.Instance.getFSVideoFileOutputPath(video, file),
61 objectStorageKey: generateWebVideoObjectStorageKey(file.filename), 61 objectStorageKey: generateWebVideoObjectStorageKey(file.filename),
62 bucketInfo: CONFIG.OBJECT_STORAGE.VIDEOS, 62 bucketInfo: CONFIG.OBJECT_STORAGE.WEB_VIDEOS,
63 isPrivate: video.hasPrivateStaticPath() 63 isPrivate: video.hasPrivateStaticPath()
64 }) 64 })
65} 65}
@@ -69,7 +69,7 @@ function storeWebVideoFile (video: MVideo, file: MVideoFile) {
69async function updateWebVideoFileACL (video: MVideo, file: MVideoFile) { 69async function updateWebVideoFileACL (video: MVideo, file: MVideoFile) {
70 await updateObjectACL({ 70 await updateObjectACL({
71 objectStorageKey: generateWebVideoObjectStorageKey(file.filename), 71 objectStorageKey: generateWebVideoObjectStorageKey(file.filename),
72 bucketInfo: CONFIG.OBJECT_STORAGE.VIDEOS, 72 bucketInfo: CONFIG.OBJECT_STORAGE.WEB_VIDEOS,
73 isPrivate: video.hasPrivateStaticPath() 73 isPrivate: video.hasPrivateStaticPath()
74 }) 74 })
75} 75}
@@ -103,7 +103,7 @@ function removeHLSFileObjectStorageByFullKey (key: string) {
103// --------------------------------------------------------------------------- 103// ---------------------------------------------------------------------------
104 104
105function removeWebVideoObjectStorage (videoFile: MVideoFile) { 105function removeWebVideoObjectStorage (videoFile: MVideoFile) {
106 return removeObject(generateWebVideoObjectStorageKey(videoFile.filename), CONFIG.OBJECT_STORAGE.VIDEOS) 106 return removeObject(generateWebVideoObjectStorageKey(videoFile.filename), CONFIG.OBJECT_STORAGE.WEB_VIDEOS)
107} 107}
108 108
109// --------------------------------------------------------------------------- 109// ---------------------------------------------------------------------------
@@ -130,7 +130,7 @@ async function makeWebVideoFileAvailable (filename: string, destination: string)
130 await makeAvailable({ 130 await makeAvailable({
131 key, 131 key,
132 destination, 132 destination,
133 bucketInfo: CONFIG.OBJECT_STORAGE.VIDEOS 133 bucketInfo: CONFIG.OBJECT_STORAGE.WEB_VIDEOS
134 }) 134 })
135 135
136 return destination 136 return destination
@@ -148,7 +148,7 @@ function getWebVideoFileReadStream (options: {
148 148
149 return createObjectReadStream({ 149 return createObjectReadStream({
150 key, 150 key,
151 bucketInfo: CONFIG.OBJECT_STORAGE.VIDEOS, 151 bucketInfo: CONFIG.OBJECT_STORAGE.WEB_VIDEOS,
152 rangeHeader 152 rangeHeader
153 }) 153 })
154} 154}