More changes to uploads:

- Have got upload images appearing in the post list
- Allowed for deleting uploads
- Allowed for seeing the upload progress
- Fixed the setting of upload properties like the MIME type
- Removed the stripe exif logic with just re-encoding PNGs and JPEGs by loading them and saving them
This commit is contained in:
Leon Mika 2026-03-04 22:33:39 +11:00
parent d0cebe6564
commit 199ff9feb9
21 changed files with 471 additions and 65 deletions

View file

@ -25,3 +25,8 @@ func GetSite(ctx context.Context) (Site, bool) {
site, ok := ctx.Value(siteKey).(Site)
return site, ok
}
func MustGetSite(ctx context.Context) Site {
site, _ := GetSite(ctx)
return site
}

View file

@ -20,6 +20,6 @@ type PendingUpload struct {
UserID int64 `json:"user_id"`
FileSize int64 `json:"file_size"`
Filename string `json:"filename"`
MIMEType string `json:"mime_type"`
MIMEType string `json:"mime_mime"`
UploadStarted time.Time `json:"upload_started"`
}