mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-02 13:12:25 -06:00
Working on emojis a bit more
This commit is contained in:
parent
046c5e91fb
commit
de9718c566
8 changed files with 154 additions and 58 deletions
|
|
@ -75,19 +75,16 @@ func (m *fileServer) ServeFile(c *gin.Context) {
|
|||
|
||||
// Only serve media types that are defined in our internal media module
|
||||
switch mediaType {
|
||||
case media.MediaHeader:
|
||||
case media.MediaAvatar:
|
||||
case media.MediaAttachment:
|
||||
case media.MediaHeader, media.MediaAvatar, media.MediaAttachment, media.MediaEmoji:
|
||||
default:
|
||||
l.Debugf("mediatype %s not recognized", mediaType)
|
||||
c.String(http.StatusNotFound, "404 page not found")
|
||||
return
|
||||
}
|
||||
|
||||
// This corresponds to original-sized image as it was uploaded, or small, which is the thumbnail
|
||||
// This corresponds to original-sized image as it was uploaded, small (which is the thumbnail), or static
|
||||
switch mediaSize {
|
||||
case media.MediaOriginal:
|
||||
case media.MediaSmall:
|
||||
case media.MediaOriginal, media.MediaSmall, media.MediaStatic:
|
||||
default:
|
||||
l.Debugf("mediasize %s not recognized", mediaSize)
|
||||
c.String(http.StatusNotFound, "404 page not found")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue