refining photo handling
continuous-integration/drone/push Build is passing

* photo metedata provided with downloaded data
* data download recognizes application/json and application/zip accepted types and serves bare json and zip with photos respectively
* thumbnail handling and storage
This commit is contained in:
zegkljan
2022-02-19 23:38:58 +01:00
parent f8b42f35f6
commit 7deb7e3f39
5 changed files with 211 additions and 24 deletions
+10 -2
View File
@@ -69,8 +69,9 @@ type HandshakeResponse struct {
}
type Data struct {
Users []User `json:"users"`
Features []Feature `json:"features"`
Users []User `json:"users"`
Features []Feature `json:"features"`
PhotoMetadata map[string]PhotoMetadata `json:"photo_metadata,omitempty"`
}
type Photo struct {
@@ -78,3 +79,10 @@ type Photo struct {
File io.ReadCloser
Size int64
}
type PhotoMetadata struct {
ContentType string `json:"content_type"`
Size int64 `json:"size"`
ID FeaturePhotoID `json:"id"`
ThumbnailFilename string `json:"thumbnail_filename"`
}