ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Web-specific functions / Upload 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
Remark: These functions are also available in prefix syntax (Upload functions (prefix syntax)).
The following functions are used to manage the file upload:
UploadCopyFileSaves on the server a file "uploaded" by the Web user. This upload may have been performed:
  • via an "Upload" edit control.
  • via a single-file or multi-file Upload control.
UploadCurrentFileIndicates the file currently uploaded via the Upload control.
UploadCurrentFileSizeReturns the total size (in bytes) of the file currently uploaded via an Upload control.
UploadCurrentFileSizeSentReturns the size (in bytes) already sent for the file currently uploaded via an Upload control.
UploadDeleteDeletes a file from the list of files to upload: the file will not be uploaded on the server.
UploadDeleteAllClears the list of files to upload: no file will be uploaded on the server.
UploadFileNameReturns the name of a file "uploaded" by the Web user. This upload may have been performed:
  • via an "Upload" edit control.
  • via a single-file or multi-file Upload control.
UploadFileSizeReturns the total size (in bytes) of a file found in an Upload control.
UploadSizeReturns the total size (in bytes) of the file currently uploaded via an Upload control.
UploadSizeSentReturns the total size (in bytes) of files already sent by the current upload via an Upload control.
UploadStartStarts sending the selected files into an Upload control.
Minimum version required
  • Version 15
Comments
Exemplo Upload
// Vou Mostrar como Fazer um Upload de uma Imagen

//=======================================
// Clic (Onclick) De Btn_ExecutaMostraFoto (navigateur )
UploadStart(UPL_Upload_Foto)
//---------------------------------------
// Acionar Ajax
// Clic de Btn_ExecutaMostraFoto (Serveuer)
IMG_Imagen=SAI_Foto
//=======================================
// A chaque modification de la liste des fichier sélectionnés dans Upl_Upload_foto(navigateur)
IF UPL_Upload_Foto..Occurrence<>0 THEN
SAI_Foto=UPL_Upload_Foto
ExecuteProcess(BTN_ExecutaMostraFoto,trtClic)
END
//---------------------------------------
// Réception des fichier uploadés de Upl_Upload_foto (Server)
//Acionar Ajax
//Se upload foto for diferente de 0
IF UPL_Upload_Foto..Occurrence<>0 THEN
UploadCopieFichier(UPL_Upload_Foto,"","",1)
END
//=======================================
//Clic de Btn_RemoverImagen
IMG_Imagen=""
//=======================================
//Clic de Btn_Valider (Serveuer)
// Lecture des informations saisies
PageToFile()
//Caso Não Gravar Imagen
sites_uteis.imagen=IMG_Imagen
//Caso Não Gravar Imagen
HSave(sites_uteis)
IF PreviousPage()<>"" THEN
PageDisplay(PreviousPage)
ELSE
//PageDisplay(PAGE_Accueil)
END

//Blog com Video e Imagen
http://windevdesenvolvimento.blogspot.com.br/2017/01/aula-1048-webdev22-14-upload-imagen.html

https://www.youtube.com/watch?v=6HxKfX07jKc
De matos
26 Jan. 2017

Last update: 06/22/2023

Send a report | Local help