fix(object): xml tagging data in post object

Signed-off-by: yhjiango <jiangyunhua@oppo.com>
This commit is contained in:
yhjiango 2023-11-07 15:48:22 +08:00 committed by Huaic J
parent 2493347023
commit e669e7b42f

View File

@ -1482,7 +1482,8 @@ func (o *ObjectNode) postObjectHandler(w http.ResponseWriter, r *http.Request) {
var tagging *Tagging
if taggingRaw := formReq.MultipartFormValue("tagging"); taggingRaw != "" {
if tagging, err = ParseTagging(taggingRaw); err != nil {
tagging = NewTagging()
if err = xml.Unmarshal([]byte(taggingRaw), tagging); err != nil {
errorCode = MalformedPOSTRequest
errorCode.ErrorMessage = fmt.Sprintf("%s (%s)", errorCode.ErrorMessage, "Invalid tagging")
return