on 04-27-2015 8:20 AM
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
Hello Krishna,
I am experiencing the exact same behaviour for the UploadCollection Control where headers are not passed with the request although i`m setting them in the view of the control in the headerParameters Aggregation.
Did you find a solution for this?
with best regards
Florian Hafner
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
/**
* The event is triggered when files are selected. Applications can set parameters and headerParameters which will be dispatched to the embedded FileUploader control.
* Parameters and headerParameters are not supported by Internet Explorer 9.
*/
change : {
var fnChange = function(oEvent){
oUploadCollection.addHeaderParameter(new sap.m.UploadCollectionParameter({ name : "x-csrf-token", value : "xyz"}));
};
var oUploadCollection = new sap.m.UploadCollection({
...
change : fnChange,
...
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.