|
|
|
|
|
- Maximum size of files to upload
- Pre-launched sessions
UploadFileName (Function) In french: UploadNomFichier Returns the name of a file "uploaded" by the Web user. This file must have been uploaded: - via a single-file or multi-file Upload field. For more details, see Upload control.
- via an "Upload" Edit control (kept for compatibility).
FOR i = 1 _TO_ UPL_Upload.Occurrence
sNomFichier is string = UploadFileName(UPL_Upload, False,i)
sNomFichierCopié is string = UploadCopyFile(UPL_Upload, fDataDir(), "",i)
IF fFileExist(fDataDir() + "\" + sNomFichierCopié) THEN
gsFichierUploadé = fDataDir() + "\" + sNomFichierCopié
END
END
FichierSource, FichierDest are strings
FichierSource = UploadFileName(SAI_Fichier)
IF FichierSource <> "" THEN
FichierDest = UploadFileName(SAI_Fichier, False)
FichierDest = "c:\documents\" + fExtractPath(FichierDest, fFile + fExtension)
fCopyFile(FichierSource, FichierDest)
END
Syntax
<Result> = UploadFileName(<Upload control> [, <File location> [, <File index>]])
<Result>: Character string Name of uploaded file. <Upload control>: Control name Name of control used for upload. This control can be: - a single-file or multi-file Upload control field.
- an "Upload" Edit control. This control contains the name and path of the file that will be sent to the server.
<File location>: Optional boolean Location of file whose name you want to get:- True (default): Name of the uploaded file on server.
- False: Name of the file to be uploaded (on the user's computer).
<File index>: Optional integer Index of the file whose name is to be retrieved. This parameter is only used for an upload performed with the multi-file Upload control. By default, this index is 1. Remarks Maximum size of files to upload By default, the size of files to upload is not limited in the WEBDEV engine. This size can be limited by the WEBDEV Application Server. The file will not be uploaded if its size exceeds the limit size. To modify the maximum size of the files to upload in the WEBDEV Application Server, the registry must be modified on the server: - To change the size of uploaded files for all WEBDEV 2025 applications, select the following key:
- 32-bit: HKEY_LOCAL_MACHINE\SOFTWARE\PC SOFT\WEBDEV\30.0
- 64-bit: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\PC SOFT\WEBDEV\30.0
- Add the MAX_UPLOAD string. The value of this string will be the maximum size of files to upload (in KB).
Pre-launched sessions If your project uses pre-launched sessions, this function must not be used in the project initialization event. This function must be used in the "Initialization in pre-launched session mode" event.
Related Examples:
|
Unit examples (WEBDEV): Uploading or Downloading a file
[ + ] This example explains how to upload (copy to the server) or download (download from the server) a file and it allows you to: - Copy a file from the browser computer to the server - Download a file found on the server - Download a file found on the server via a link - Download a file found on the server by requesting its opening
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|