Hi Team,
I am working on azure functions(http trigger based), is there an way to grab the filename on posting binary file..I can get content type, length but I need the filename.
Thanks
Hi Team,
I am working on azure functions(http trigger based), is there an way to grab the filename on posting binary file..I can get content type, length but I need the filename.
Thanks
@JAPNAMSINGH-6684 If you are posting bytes directly to the endpoint, there would be no way to get the filename since that is something that is present in the underlying filesystem and not really the file itself.
Instead, you could opt to make a multipart request or simply include the filename in a HTTP header of the request.
@PramodValavala-MSFT ok, When I do multipart request , the word file(content type ="text/plain") is getting corrupted on uploading to SharePoint site using graph api
@JAPNAMSINGH-6684 Could you confirm if you are parsing the multipart request before uploading to SharePoint? Also, you could dump the bytes into a file (blob storage or local) to test.
@PramodValavala-MSFT Thanks for your help I was able to upload based on form-data and get filename I used the graph sdk way
7 people are following this question.