aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-12-04 16:02:49 +0100
committerChocobozzz <me@florianbigard.com>2018-12-04 16:04:15 +0100
commit6040f87d143a5fa01db79867ece8197c3ce7be47 (patch)
tree98e5fcbced3e55df2f51421250eaa57f3c511299 /server/lib/activitypub
parent745778256ced65415b04a9817fc49db70d4b6681 (diff)
downloadPeerTube-6040f87d143a5fa01db79867ece8197c3ce7be47.tar.gz
PeerTube-6040f87d143a5fa01db79867ece8197c3ce7be47.tar.zst
PeerTube-6040f87d143a5fa01db79867ece8197c3ce7be47.zip
Add tmp and redundancy directories
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r--server/lib/activitypub/actor.ts4
-rw-r--r--server/lib/activitypub/videos.ts3
2 files changed, 2 insertions, 5 deletions
diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts
index 504263c99..bbe48833d 100644
--- a/server/lib/activitypub/actor.ts
+++ b/server/lib/activitypub/actor.ts
@@ -178,9 +178,7 @@ async function fetchAvatarIfExists (actorJSON: ActivityPubActor) {
178 const extension = IMAGE_MIMETYPE_EXT[actorJSON.icon.mediaType] 178 const extension = IMAGE_MIMETYPE_EXT[actorJSON.icon.mediaType]
179 179
180 const avatarName = uuidv4() + extension 180 const avatarName = uuidv4() + extension
181 const destPath = join(CONFIG.STORAGE.AVATARS_DIR, avatarName) 181 await downloadImage(actorJSON.icon.url, CONFIG.STORAGE.AVATARS_DIR, avatarName, AVATARS_SIZE)
182
183 await downloadImage(actorJSON.icon.url, destPath, AVATARS_SIZE)
184 182
185 return avatarName 183 return avatarName
186 } 184 }
diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts
index a5d649391..3d17e6846 100644
--- a/server/lib/activitypub/videos.ts
+++ b/server/lib/activitypub/videos.ts
@@ -95,9 +95,8 @@ function fetchRemoteVideoStaticFile (video: VideoModel, path: string, reject: Fu
95 95
96function generateThumbnailFromUrl (video: VideoModel, icon: ActivityIconObject) { 96function generateThumbnailFromUrl (video: VideoModel, icon: ActivityIconObject) {
97 const thumbnailName = video.getThumbnailName() 97 const thumbnailName = video.getThumbnailName()
98 const thumbnailPath = join(CONFIG.STORAGE.THUMBNAILS_DIR, thumbnailName)
99 98
100 return downloadImage(icon.url, thumbnailPath, THUMBNAILS_SIZE) 99 return downloadImage(icon.url, CONFIG.STORAGE.THUMBNAILS_DIR, thumbnailName, THUMBNAILS_SIZE)
101} 100}
102 101
103function getOrCreateVideoChannelFromVideoObject (videoObject: VideoTorrentObject) { 102function getOrCreateVideoChannelFromVideoObject (videoObject: VideoTorrentObject) {