You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Mridul Pathak (Jira)" <ji...@apache.org> on 2026/10/22 11:05:00 UTC

[jira] [Created] (OFBIZ-13708) attachUploadToDataResource wipes DataResource.mimeTypeId when the upload has no content type

Mridul Pathak created OFBIZ-13708:
-------------------------------------

             Summary: attachUploadToDataResource wipes DataResource.mimeTypeId when the upload has no content type
                 Key: OFBIZ-13708
                 URL: https://issues.apache.org/jira/browse/OFBIZ-13708
             Project: OFBiz
          Issue Type: Bug
          Components: content
    Affects Versions: Upcoming Branch, 24.09.08
            Reporter: Mridul Pathak
            Assignee: Mridul Pathak


{{saveLocalFileDataResource}} and {{saveExtFileDataResource}} assign {{dataResource.mimeTypeId = parameters._uploadedFile_contentType}} unconditionally. The mini-lang {{<set>}} skipped a null source, so a missing content type kept the stored mimeTypeId; the Groovy stores null and {{store()}} wipes it (for example createContentFromUploadedFile derives the mimeTypeId from the file bytes and the attach step then erases it). Assign only when the content type is present.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)