Details
-
Bug
-
Resolution: Done
-
Medium
-
None
-
None
-
None
-
None
Description
This tutorial https://docs.magnolia-cms.com/product-docs/6.2/Developing/Development-how-tos/How-to-add-an-asset-with-REST.html doesn't work completely because you need to be sure that when an asset is uploaded the size of that asset needs to be written to the jcr:content subnode.
<sv:property sv:name="size" sv:type="Long"> <sv:value>11380</sv:value> </sv:property>
Without the size the asset cannot be used correctly.
Reproduce
Follow the instructions to upload the asset (2 rest calls). Then open the asset in the detail subapp or try to use the asset or try to download the asset. Doesn't work.
Notes
Not sure how to fix it. Somehow the size of the asset needs to be sent on the second request. Here is how we do it in java when the assets is uploaded through the UI.
Also the width and height should be sent as well to have a complete asset with all metadata. Otherwise it will have the asset as 1x1.
Checklists
Attachments
Issue Links
- is related to
-
MGNLREST-359 Cannot put nodes with colons in the name
-
- Closed
-
-
MGNLREST-349 Creating asset via rest is not possible anymore
-
- Closed
-
-
MGNLDAM-1018 Upload asset command
-
- Open
-