Rename Object to FileUpload; use native Postgres $n placeholders.
This commit is contained in:
@@ -75,7 +75,7 @@ func (s *Server) handleProfile(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
key := path.Join("avatars", u.ID, uuid.NewString()+ext)
|
||||
limited := io.LimitReader(file, (2<<20)+1)
|
||||
url, upErr := s.cfg.Blob.Upload(r.Context(), blob.Object{
|
||||
url, upErr := s.cfg.Blob.Upload(r.Context(), blob.FileUpload{
|
||||
Key: key,
|
||||
Body: limited,
|
||||
ContentType: contentType,
|
||||
|
||||
Reference in New Issue
Block a user