Rename attachments in MyTask app on FaaS. The root cause of this issue is: the HTTP request header field ‘newfilename’ is missing in Gateway system. And the Gateway team gives us below investigation result. As we discussed, I changed the file rename request to batch request and issue is solved.
But I found the file upload feature is unavailable in all our apps in FaaS. Please kindly refer to the attachment for detail analyzing results. In a short word, the filed ‘slug’(object GUID) is missing when the HTTP request sending to gateway system. From my analysis, you will find that ‘slug’ is a predefined parameter in the framework logic, so I think it should not be discarded in FaaS framework. Cannot find ‘Slug’ parameter from parameters table, the slug is the task GUID which the file is upload to.
The file cannot be uploaded because Task GUID is blank! Task existence check failed!
Checking why the value of slug is missing! Firstly, check the HTTP request send from UI. The header data indeed contains file ‘slug’
When getting the header fields from HTTP request, field ‘slug’ has lost. Errors starts from here!
-----------------------------Check the same call stack on on-premise system -------------------------------------------- The HTTP request send from UI, it has the same structure with FaaS
The header field ‘slug’ has not lost when getting the header fields from HTTP request, but it lost in FaaS GateWay system!
------------------------------Try to fix this issue in Faas------------------------------------------------------------------------- Step1: use Batch request in FaaS fiori UI The HTTP request of file uploading is actually sent from function FileUploader.js->sendFiles(), so we cannot change the request to Batch
Step2: want to try to use ‘useBatch’: true in configuration.js, but the change cannot be tested before codes released to FaaS.
The issue is attachment uploading doesn’t work in faas environment, the reason described in incident is that there is an http request header(named slug) is not allowed in faas.
As we checked our code that this request header is not only consumed by our application code, and further it is mandatory required by SAP gateway framework, you can see in following screen shot of gateway code:
In gateway framework, if it is a media stream type request, it requires an http header named slug.
We think it is not only for our application, but also the media creation request from gateway to faas in generic.