Skip to Content
0
Apr 27, 2015 at 07:20 AM

UploadCollection not sending Headers (XSRF)

240 Views

Hi all,

I am using UploadCollection for file upload.

My XML View looks like this

<IconTabFilter id="iconTabFilter3" text="Attachments" icon="sap-icon://attachment-photo">
   <content>
      <UploadCollection id="UploadCollection" maximumFilenameLength="55" multiple="true" items="{/CreateAttachmentSet}" showSeparators="None" fileDeleted="onFileDeleted" fileRenamed="onFileRenamed" uploadComplete="onUploadComplete" uploadUrl="{path:'Aufnr', formatter: 'ZServiceOrderDetail.util.Formatter.uploadUrl'}">
         <UploadCollectionItem contributor="{CreateName}" documentId="{Item}" fileName="{path: 'Item', formatter: 'ZServiceOrderDetail.util.Formatter.fileName'}" mimeType="{MimeType}" uploadedDate="{CreateDate}" url="{parts:['Aufnr', 'Item'],                      formatter:'ZServiceOrderDetail.util.Formatter.downloadUrl'                 }" enableEdit="false" visibleEdit="false" enableDelete="true" />
         <headerParameters>
            <UploadCollectionParameter name="x-csrf-token" value="xyz" />
         </headerParameters>
      </UploadCollection
   </content>
</IconTabFilter>

As you can see I am sending a dummy csrf token here. In the controller, I get the token and set the value.

When I see the request header, I do not see the header. Atleast the dummy FXRF token should have been sent?

Thanks

Krishna