|
|
@ -378,7 +378,6 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re |
|
|
|
// write success response.
|
|
|
|
// write success response.
|
|
|
|
writeSuccessResponse(w, encodedSuccessResponse) |
|
|
|
writeSuccessResponse(w, encodedSuccessResponse) |
|
|
|
|
|
|
|
|
|
|
|
if globalEventNotifier.IsBucketNotificationSet(bucket) { |
|
|
|
|
|
|
|
// Notify object created event.
|
|
|
|
// Notify object created event.
|
|
|
|
eventNotify(eventData{ |
|
|
|
eventNotify(eventData{ |
|
|
|
Type: ObjectCreatedCopy, |
|
|
|
Type: ObjectCreatedCopy, |
|
|
@ -388,7 +387,6 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re |
|
|
|
"sourceIPAddress": r.RemoteAddr, |
|
|
|
"sourceIPAddress": r.RemoteAddr, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// PutObjectHandler - PUT Object
|
|
|
|
// PutObjectHandler - PUT Object
|
|
|
@ -482,7 +480,6 @@ func (api objectAPIHandlers) PutObjectHandler(w http.ResponseWriter, r *http.Req |
|
|
|
w.Header().Set("ETag", "\""+objInfo.MD5Sum+"\"") |
|
|
|
w.Header().Set("ETag", "\""+objInfo.MD5Sum+"\"") |
|
|
|
writeSuccessResponse(w, nil) |
|
|
|
writeSuccessResponse(w, nil) |
|
|
|
|
|
|
|
|
|
|
|
if globalEventNotifier.IsBucketNotificationSet(bucket) { |
|
|
|
|
|
|
|
// Notify object created event.
|
|
|
|
// Notify object created event.
|
|
|
|
eventNotify(eventData{ |
|
|
|
eventNotify(eventData{ |
|
|
|
Type: ObjectCreatedPut, |
|
|
|
Type: ObjectCreatedPut, |
|
|
@ -492,7 +489,6 @@ func (api objectAPIHandlers) PutObjectHandler(w http.ResponseWriter, r *http.Req |
|
|
|
"sourceIPAddress": r.RemoteAddr, |
|
|
|
"sourceIPAddress": r.RemoteAddr, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// Multipart objectAPIHandlers
|
|
|
|
/// Multipart objectAPIHandlers
|
|
|
@ -834,7 +830,6 @@ func (api objectAPIHandlers) CompleteMultipartUploadHandler(w http.ResponseWrite |
|
|
|
w.Write(encodedSuccessResponse) |
|
|
|
w.Write(encodedSuccessResponse) |
|
|
|
w.(http.Flusher).Flush() |
|
|
|
w.(http.Flusher).Flush() |
|
|
|
|
|
|
|
|
|
|
|
if globalEventNotifier.IsBucketNotificationSet(bucket) { |
|
|
|
|
|
|
|
// Fetch object info for notifications.
|
|
|
|
// Fetch object info for notifications.
|
|
|
|
objInfo, err := objectAPI.GetObjectInfo(bucket, object) |
|
|
|
objInfo, err := objectAPI.GetObjectInfo(bucket, object) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
@ -851,7 +846,6 @@ func (api objectAPIHandlers) CompleteMultipartUploadHandler(w http.ResponseWrite |
|
|
|
"sourceIPAddress": r.RemoteAddr, |
|
|
|
"sourceIPAddress": r.RemoteAddr, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// Delete objectAPIHandlers
|
|
|
|
/// Delete objectAPIHandlers
|
|
|
@ -895,7 +889,6 @@ func (api objectAPIHandlers) DeleteObjectHandler(w http.ResponseWriter, r *http. |
|
|
|
} |
|
|
|
} |
|
|
|
writeSuccessNoContent(w) |
|
|
|
writeSuccessNoContent(w) |
|
|
|
|
|
|
|
|
|
|
|
if globalEventNotifier.IsBucketNotificationSet(bucket) { |
|
|
|
|
|
|
|
// Notify object deleted event.
|
|
|
|
// Notify object deleted event.
|
|
|
|
eventNotify(eventData{ |
|
|
|
eventNotify(eventData{ |
|
|
|
Type: ObjectRemovedDelete, |
|
|
|
Type: ObjectRemovedDelete, |
|
|
@ -907,5 +900,4 @@ func (api objectAPIHandlers) DeleteObjectHandler(w http.ResponseWriter, r *http. |
|
|
|
"sourceIPAddress": r.RemoteAddr, |
|
|
|
"sourceIPAddress": r.RemoteAddr, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|