PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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.
Versions 16 and later
WEBDEV - Server codePHP This function is now available for the PHP sites.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 16
WEBDEV - Server codePHP This function is now available for the PHP sites.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codePHP This function is now available for the PHP sites.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Versions 18 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 18
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 19 and later
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
New in version 19
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
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 find out the error details, use ErrorInfo associated with the errMessage constant.
<Form Name>: Character string (with quotes)
Name of the HTTP form to use. This name was defined by HTTPCreateForm. An error occurs if the form does not exist.
<Parameter Name>: Character string (with quotes)
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 (with quotes)
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 (with quotes)
Description of the MIME type of the file. This parameter corresponds to the "Content-Type" header.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230com.dll
Windows Mobile wp230com.dll
Linux wd230com.so
Android wd230android.jar
Minimum required version
  • 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
Jul. 24 2016