Official Content

Adds file contents to a data buffer that is going to be sent.



     Variable name based on an HttpClient or an HttpResponse data type.

     String containing the file's path.

Name (Optional)
     String containing the name of the variable with which the server waits for the file.


Extended data types: HttpClient, HttpResponse
Generators: .NET.NET Framework,  Java


If the content of the HttpClient message is multipart / form-data (given by Content-Type Header), then the AddFile method adds the file as multipart. In this case, the second parameter is needed to indicate the name of the variable that the file represents. Also, you have to necessarily precede your sentence with a header that specifies a specific Content-Type, like this: 

&Httpclient.Addheader("Content-Type", !"multipart/form-data")

See Also

HttpClient data type
HttpResponse data type


Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant