cancel
Showing results for 
Search instead for 
Did you mean: 

How to upload directly in create wizard of the backoffice

Former Member
0 Kudos

Now, I want to implement create wizard for upload some documents file directly.

I already refer to some example about the file upload.

but many example using DefaultFileUploadEditor. But I think this editor for using existing media file.

Anyone knows implement upload and than matching any model in create wizard?

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member632755
Active Contributor
0 Kudos

Hi,

this story is on our radar, nevertheless I can't tell when it will be delivered. The problem is that the editor would have to create a new instance of a Media and in fact create at least two entities at once. This wouldn't be a big problem beside the anomalies that may happen due to model invalidation (when user cancels).

I think that this story should be possible to be implemented in the project directly.

Cheers, Wojtek

Former Member
0 Kudos

Can you let me know example using defaultfileupload... ???

     <wz:flow xmlns:wz="http://www.hybris.com/cockpitng/config/wizard-config" id="TokoWeddingMoveWizard"
         title="create.TokoWeddingMove.title">
         <wz:prepare id="TokoWeddingMovePrepare">
             <wz:initialize property="newTokoWeddingMove" type="TokoWeddingMove"/>
         </wz:prepare>
         <wz:step id="step1" label="create.TokoWeddingMove.essential.label">
             <wz:content id="step1.content">
                 <wz:property-list root="newTokoWeddingMove">
                     <wz:property qualifier="cmsSite" />
                     <wz:property qualifier="customer" />
                     <wz:property qualifier="type" />
                     <wz:property qualifier="baseDate" />
                     <wz:property qualifier="attachments" editor="com.hybris.cockpitng.editor.defaultfileupload"/>
                 </wz:property-list>
             </wz:content>
             <wz:navigation id="step1.navigation">
                 <wz:cancel />
                 <wz:done
                     visible="newTokoWeddingMove.cmsSite != null and newTokoWeddingMove.customer != null and newTokoWeddingMove.type != null and newTokoWeddingMove.baseDate != null">
                     <wz:save property="newTokoWeddingMove" />
                 </wz:done>
             </wz:navigation>
         </wz:step>
     </wz:flow>
 </context>

After select file, How I can map attachments property??