Prep for reactions, some fixes and improvements
Some checks failed
/ docker (push) Failing after 1m35s

This commit is contained in:
Melody Becker 2025-06-16 08:13:11 +02:00
parent 4b62c32247
commit 8947d97825
Signed by: mstar
SSH key fingerprint: SHA256:vkXfS9FG2pVNVfvDrzd1VW9n8VJzqqdKQGljxxX8uK8
13 changed files with 262 additions and 43 deletions

View file

@ -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