Hello,
follow my code below:
***
Taux_API_Arg = '{'
Taux_API_Arg += '"path":"/codechain/extrato.pdf",'
Taux_API_Arg += '"mode":"overwrite",'
Taux_API_Arg += '"autorename":true,'
Taux_API_Arg += '"mute":false'
Taux_API_Arg += '}'
cBuff := FileStr("C:\Onedrive\fontes\ManagerDropbox\extrato.pdf")
cEncBuff := hb_Base64Encode( cBuff, Len( cBuff ) )
oHttp := CreateObject("MSXML2.ServerXMLHTTP.6.0")
oHttp:Open("POST", "https://content.dropboxapi.com/2/files/upload", .f.)
oHttp:setRequestHeader("Authorization","Bearer " + alltrim(Taux_Token) )
oHttp:setRequestHeader("Content-Type", "application/octet-stream")
oHttp:setRequestHeader("Dropbox-API-Arg", Taux_API_Arg )
oHttp:Send(cEncBuff)
***
The file is transferred to the Dropbox repository, but with a larger size, therefore corrupted !!
Original size: 58.28 Kb
Size after download: 77.44 Kb
PS: Transferring by POSTMAN, works correctly.
Grateful