mirror of
https://github.com/minio/minio.git
synced 2025-11-20 18:06:10 -05:00
api: Implement multiple objects Delete api - fixes #956
This API takes input XML input in following form.
```
<?xml version="1.0" encoding="UTF-8"?>
<Delete>
<Quiet>true</Quiet>
<Object>
<Key>Key</Key>
</Object>
<Object>
<Key>Key</Key>
</Object>
...
</Delete>
```
and responds the list of successful deletes, list of errors
for all the deleted objects.
```
<?xml version="1.0" encoding="UTF-8"?>
<DeleteResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Deleted>
<Key>sample1.txt</Key>
</Deleted>
<Error>
<Key>sample2.txt</Key>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
</Error>
</DeleteResult>
```
This commit is contained in:
@@ -62,6 +62,7 @@ const (
|
||||
InvalidCopyDest
|
||||
MalformedXML
|
||||
MissingContentLength
|
||||
MissingContentMD5
|
||||
MissingRequestBodyError
|
||||
NoSuchBucket
|
||||
NoSuchKey
|
||||
@@ -125,7 +126,7 @@ var errorCodeResponse = map[int]APIError{
|
||||
},
|
||||
BadDigest: {
|
||||
Code: "BadDigest",
|
||||
Description: "The Content-MD5 you specified did not match what we received.",
|
||||
Description: "The Content-Md5 you specified did not match what we received.",
|
||||
HTTPStatusCode: http.StatusBadRequest,
|
||||
},
|
||||
BucketAlreadyExists: {
|
||||
@@ -165,7 +166,7 @@ var errorCodeResponse = map[int]APIError{
|
||||
},
|
||||
InvalidDigest: {
|
||||
Code: "InvalidDigest",
|
||||
Description: "The Content-MD5 you specified is not valid.",
|
||||
Description: "The Content-Md5 you specified is not valid.",
|
||||
HTTPStatusCode: http.StatusBadRequest,
|
||||
},
|
||||
InvalidRange: {
|
||||
@@ -183,6 +184,11 @@ var errorCodeResponse = map[int]APIError{
|
||||
Description: "You must provide the Content-Length HTTP header.",
|
||||
HTTPStatusCode: http.StatusLengthRequired,
|
||||
},
|
||||
MissingContentMD5: {
|
||||
Code: "MissingContentMD5",
|
||||
Description: "Missing required header for this request: Content-Md5.",
|
||||
HTTPStatusCode: http.StatusBadRequest,
|
||||
},
|
||||
MissingRequestBodyError: {
|
||||
Code: "MissingRequestBodyError",
|
||||
Description: "Request body is empty.",
|
||||
|
||||
Reference in New Issue
Block a user