mirror of
https://github.com/minio/minio.git
synced 2025-11-20 09:56:07 -05:00
fs: Fail createObject with appropriate message.
Fail createObject() if a file already exists and one attempts to create a prefix/directory by same name. Send an approriate error back to the client as 409 Conflict.
This commit is contained in:
@@ -170,6 +170,8 @@ func (api CloudStorageAPI) PutObjectHandler(w http.ResponseWriter, req *http.Req
|
||||
writeErrorResponse(w, req, EntityTooLarge, req.URL.Path)
|
||||
case fs.InvalidDigest:
|
||||
writeErrorResponse(w, req, InvalidDigest, req.URL.Path)
|
||||
case fs.ObjectExistsAsPrefix:
|
||||
writeErrorResponse(w, req, ObjectExistsAsPrefix, req.URL.Path)
|
||||
default:
|
||||
writeErrorResponse(w, req, InternalError, req.URL.Path)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user