-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for custom url generation on s3 stored files
Uses two config keys to support url generation that doesn't directly go to (compatible s3). Can be used to generate urls to any cache server or CDN.
- Loading branch information
Showing
4 changed files
with
27 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,11 +78,13 @@ const CONFIG = { | |
ENDPOINT: config.get<string>('s3.endpoint'), | ||
VIDEOS_BUCKETINFO: { | ||
bucket: config.get<string>('s3.videos_bucket'), | ||
prefix: config.get<string>('s3.videos_prefix') | ||
prefix: config.get<string>('s3.videos_prefix'), | ||
url_template: config.get<string>('s3.videos_url_template') | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
pingiun
Author
Contributor
|
||
}, | ||
STREAMING_PLAYLISTS_BUCKETINFO: { | ||
bucket: config.get<string>('s3.streaming_playlists_bucket'), | ||
prefix: config.get<string>('s3.streaming_playlists_prefix') | ||
prefix: config.get<string>('s3.streaming_playlists_prefix'), | ||
url_template: config.get<string>('s3.streaming_playlists_template') | ||
} | ||
}, | ||
WEBSERVER: { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Can't we just rewrite this line to the following?
Then we don't need the
generateUrl
function.