swarm/api/http: remove ModTime=now for direct and multipart uploads (#17945)

This commit is contained in:
Elad 2018-10-19 16:02:44 +02:00 committed by Anton Evangelatov
parent 75060ef96e
commit 66debd91d9

View File

@ -409,7 +409,6 @@ func (s *Server) handleMultipartUpload(r *http.Request, boundary string, mw *api
Path: path, Path: path,
ContentType: part.Header.Get("Content-Type"), ContentType: part.Header.Get("Content-Type"),
Size: size, Size: size,
ModTime: time.Now(),
} }
log.Debug("adding path to new manifest", "ruid", ruid, "bytes", entry.Size, "path", entry.Path) log.Debug("adding path to new manifest", "ruid", ruid, "bytes", entry.Size, "path", entry.Path)
contentKey, err := mw.AddEntry(r.Context(), reader, entry) contentKey, err := mw.AddEntry(r.Context(), reader, entry)
@ -428,7 +427,6 @@ func (s *Server) handleDirectUpload(r *http.Request, mw *api.ManifestWriter) err
ContentType: r.Header.Get("Content-Type"), ContentType: r.Header.Get("Content-Type"),
Mode: 0644, Mode: 0644,
Size: r.ContentLength, Size: r.ContentLength,
ModTime: time.Now(),
}) })
if err != nil { if err != nil {
return err return err