ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / HTTP functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
HTTPAddFile (Function)
In french: HTTPAjouteFichier
Adds a file to the HTTP form. This form was created by HTTPCreateForm and it will be sent by HTTPSendForm.
Example
HTTPCreateForm("FORM")
HTTPAddParameter("FORM", "Price", "3400")
HTTPAddFile("FORM", "Photo", "C:\Temp\MyPhoto.BMP")
...
HTTPSendForm("FORM", "www.mysite.com")
Syntax
<Result> = HTTPAddFile(<Form name> , <Parameter name> , <File name> [, <Type of file>])
<Result>: Boolean
  • True if the file was added to the HTTP form,
  • False if an error occurred. To get more details on the error, use ErrorInfo with the errMessage constant.
<Form name>: Character string
Name of the HTTP form to use. This name was defined with HTTPCreateForm. An error occurs if the form does not exist.
<Parameter name>: Character string
Name of the parameter to be added to the form. This parameter will be linked to the file. If the name of the parameter already exists in the form, its value is overwritten.
<File name>: Character string
Full path of file that will be added to the form. This file must be accessible from the current computer. Indeed, the file is immediately opened in read-only and locked in write mode. The file will be read when HTTPSendForm is run.
<Type of file>: Character string
Description of the MIME type of the file. This parameter corresponds to the "Content-Type" header.
Component: wd290com.dll
Minimum version required
  • Version 12
This page is also available for…
Comments
LINK EXEMPLO ADICIONAL
http://forum.pcsoft.fr/fr-FR/pcsoft.br.windev/1533-exemplo-uso-dos-comandos-httpcreateform-httpaddparameter-httpsendform-httpgetresult/read.awp
BOLLER ADRIANO
24 Jul. 2016

Last update: 05/26/2022

Send a report | Local help