Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

File upload using CQ.form.UploadSubmitAction in CQ5.5

Avatar

Level 2

Hi,

I am new to CQ5 and I am trying to create a custom file upload component. I've succeeded with the implementation using XML HTTP request for HTML5 supported browsers.

But i got stuck while implementing the same for non-HTML5 browsers like IE8. I checked the code in the DAM upload component (/libs/cq/ui/widgets/source/widgets/html5/UploadDialog.js) and found the below piece of code,

var action = new CQ.form.UploadSubmitAction(this.form, config);
this.form.doAction(action);

The function UploadSubmitAction is present in the below path, which they are specifically using for non-HTML5 browsers,

/libs/cq/ui/widgets/source/widgets/form/UploadSubmitAction.js

I am not sure how to use this function in my custom implementation as I am unable to call these functions using my form. Below is the form which i am using in my implementaion,

<form id="form_upload" name="frm" target="upload_target" method="POST" enctype="multipart/form-data">

    <input id="fileUpload_input" type="file"/>

</form>

Any help in implementing this would be appreciated. Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Level 10

We have a community article that talks about how to upload files to CQ. 

See if this article helps you:

http://helpx.adobe.com/experience-manager/using/uploading-files-aem1.html

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

We have a community article that talks about how to upload files to CQ. 

See if this article helps you:

http://helpx.adobe.com/experience-manager/using/uploading-files-aem1.html