I have drag n dropped a logo from DAM and clicked save. Now when I open the dialog again, I can see that the previous link of logo is there but the dialog still needs me to add image.
can anybody tell me why is this happening? why the image is not retained
I'm using AEM 6.3 and following is the dialog code
<file
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/fileupload"
autoStart="{Boolean}true"
cq-msm-lockable="/file"
fieldLabel="Upload files"
mimeTypes="[image/*]"
multiple="{Boolean}false"
name="./file"
sizeLimit="100000000"
text="Upload file"
uploadUrl="/content/dam"
required="{Boolean}true"
allowUpload="{Boolean}false"
uploadUrlBuilder=""/>
Solved! Go to Solution.
Views
Replies
Total Likes
Please change mimeTypes property value as highlighted below, then it will work as expected.
<file
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/fileupload"
autoStart="{Boolean}true"
cq-msm-lockable="/file"
fieldLabel="Upload files"
mimeTypes="[image]"
multiple="{Boolean}false"
name="./file"
sizeLimit="100000000"
text="Upload file"
uploadUrl="/content/dam"
required="{Boolean}true"
allowUpload="{Boolean}false"
uploadUrlBuilder=""/>
Can you paste here how the File Upload is defined in the dialog?
And what AEM version you use.
Views
Replies
Total Likes
Please change mimeTypes property value as highlighted below, then it will work as expected.
<file
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/fileupload"
autoStart="{Boolean}true"
cq-msm-lockable="/file"
fieldLabel="Upload files"
mimeTypes="[image]"
multiple="{Boolean}false"
name="./file"
sizeLimit="100000000"
text="Upload file"
uploadUrl="/content/dam"
required="{Boolean}true"
allowUpload="{Boolean}false"
uploadUrlBuilder=""/>
granite/ui/components/foundation/form/fileupload
This is legacy Coral2 FileUpload [1], better not to use it.
Try Coral3 FilleUpload [2], does the issue persists?
granite/ui/components/coral/foundation/form/fileupload
[1] https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/granite-ui...
[2] https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/granite-ui...
using Coral 3 lets me choose while . I want drag n drop so that user cannot upload anything outside DAM. Is there a way to do this in coral3?
Views
Replies
Total Likes
Hi @Vinit_Pillai ,
please update the dialog as below.
<file
jcr:primaryType="nt:unstructured"
jcr:title="Image"
sling:resourceType="granite/ui/components/foundation/form/fileupload"
autoStart="{Boolean}false"
class="cq-droptarget"
fileNameParameter="./fileName"
fileReferenceParameter="./fileReference"
mimeTypes="[image]"
multiple="{Boolean}false"
name="./file"
uploadUrl="${suffix.path}"
useHTML5="{Boolean}true"/>
Change the mimeTypes property value to image( remove /*), that should resolve your issue.
-AG
Views
Replies
Total Likes
Use cq/gui/components/authoring/dialog/fileupload which core v2 Image component also uses.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies