PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
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 into the HTTP form. This form was created by HTTPCreateForm and it will be sent by HTTPSendForm.
Example
HTTPCreateForm("FORM")
HTTPAddParameter("FORM", "Prix", "3400")
HTTPAddFile("FORM", "Photo", "C:\Temp\MaPhoto.gif")
...
HTTPSendForm("FORM", "www.monsite.fr")
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 the details of the error, use ErrorInfo with the errMessage constant.
<Form name>: Character string
Name of the HTTP form to use. This name was given thanks to the HTTPCreateForm function. An error occurs if the form does not exist.
<Parameter name>: Character string
Name of the parameter that must be added into 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 into 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: wd270com.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