Hi,
Is there a sane way to upload an image through the wizard of a blueprint? I want to be able to attach multiple images on the wizard, and on page creation, display the images along side other form content.
I tried to implement the .attachmentsPanel template but haven't been able to configure the file upload. Is there a way to handle file upload on postRender? Like you can handle labels using the name="lablelsString" in the <input> field.
If I put the following code in the form, is there a way to use an Ajax call on postRender to upload the
selected files?
<div class="upload-field field-group"> <label for="uploadFile">Upload file</label> <input class="upfile" type="file" id="uploadFile" name="uploadFile" title="upload file"> </div>
I'm just stuck on trying to figure out a path to go about this issue. Any help would
be appreciated.
Use AJS postRender for the blueprint wizard page to make an ajax call to a servlet to create a dummypage/space. Get the dummy page/space homepage id, make an ajax rest call to upload image to the dummy page. On BluePrintCreateEvent, copy the attachment from the dummy page/space homepage to the created page/space homepage. Then delete the dummy page/space's homepage within the same EventListener class. Through postRender in the javascript make another ajax call to the servlet to delete the dummy page and its attachments on clicking back or close.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.