Prep for reactions, some fixes and improvements
Some checks failed
/ docker (push) Failing after 1m35s
Some checks failed
/ docker (push) Failing after 1m35s
This commit is contained in:
parent
4b62c32247
commit
8947d97825
13 changed files with 262 additions and 43 deletions
|
@ -14,6 +14,14 @@ type Server struct {
|
|||
client *minio.Client
|
||||
}
|
||||
|
||||
/*
|
||||
TODO: Figure out an api for a microservice for transcoding media, see https://tech.lgbt/@lina/114682780787448797
|
||||
- Read endpoint from config
|
||||
- Try to reach transcoder
|
||||
- If transcoder is alive, use it for transcoding
|
||||
- If not alive, store files as is
|
||||
*/
|
||||
|
||||
var (
|
||||
ErrNoBucketAccess = errors.New("can't access configured bucket")
|
||||
)
|
||||
|
@ -50,7 +58,7 @@ func NewServer() (*Server, error) {
|
|||
return &Server{client: client}, nil
|
||||
}
|
||||
|
||||
// Convert a userId and filename into a proper filepath for s3.
|
||||
// UsernameFilename converts a userId and filename into a proper filepath for s3.
|
||||
// Reason for this is that the userId for external users is a valid url which needs to be encoded
|
||||
func UsernameFilename(userId, filename string) string {
|
||||
return userId + "//" + filename
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue