Click here to Skip to main content
15,885,980 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
hi,

I am trying to put i a file on a sharepoint drive with MS GRAPH.
it works for text files but other files get changed - result file corrupt
its with a FMIS program, i only have some sort of lowcode i can use

when i check the data of the upload file some characters are changed / added

What I have tried:

I upload the file.
open / convert the file to a stream.
then i use the command HTTPREQUEST.

<Command Name="PUT FILE" CommandName="HttpRequest_Execute">
            <Parameter   Name="Credential"       Direction="In"      Value="SHAREPOINT" />
            <Parameter   Name="HttpHeaders"      Direction="In"      Value="Content-Type:application/pdf" />
            <Parameter   Name="Method"           Direction="In"      Value="PUT" />
            <Parameter   Name="PostData"         Direction="In"      Value="${FileStream}" />
            <Parameter   Name="Url"              Direction="In"      Value="https://graph.microsoft.com/v1.0/drives/driveid/items/root:/${FileName}:/content" />
            <Parameter   Name="ResponseData"     Direction="Out"                                                                                                                                                         OutputProperty="${WebResponseData}" />
            <Parameter   Name="ResponseStatus"   Direction="Out"                                                                                                                                                         OutputProperty="${WebResponseStatus}" />
        </Command>


When i execute the command i get this result:
Request:
POST /v1.0/drives/driveid/items/root:/0.pdf:/content HTTP/1.1
Content-Type: application/pdf
Host: mytest.sharepoint.com
Connection: Keep-Alive
'file_content'
Posted
Updated 26-Jul-21 4:48am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900