AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones específicas de la Web / Funciones de carga de archivos (Upload)
  • Operating mode of the file upload performed via the Upload control
  • Limits
  • Tamaño máximo de los archivos a cargar
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Starts sending the selected files into an Upload control. At the end of the upload, the list of the files to send is cleared on the browser (no matter whether the control sends one or more files).
Ejemplo
// -- Event "Whenever modifying the list of selected files"
// in the UPL_Upload control
// Starts sending the file and transmits the content of EDT_Family control
UploadStart(MySelf, EDT_Family)
// -- Event "Receive files uploaded"
PROCEDURE Reception(FamilyName)
// Copies the file into the directory corresponding to the family
UploadCopyFile(MySelf, CompleteDir(sDestinationDirectory) + FamilyName, "")
Sintaxis
UploadStart(<Upload control> [, <Parameter 1> [... [, <Parameter N>]]])
<Upload control>: Control name
Name of the Upload control to be used.
<Parameter 1>: Any type
First parameter that must be passed to the server event "Receive files uploaded". To retrieve this parameter, a procedure in the following format must be declared in the "Receive files uploaded" event:
PROCEDURE ProcedureName(<Parameter 1> [, ... [, <Parameter N>]])
PHP If this function is used in a PHP site, you cannot specify the parameters to pass to the server event "Receive files uploaded". This feature is not supported in PHP.
<Parameter N>: Any type
Nth parameter that must be passed to the server event "Receive files uploaded". To retrieve this parameter, a procedure in the following format must be declared in the "Receive files uploaded" event:
PROCEDURE ProcedureName(<Parameter 1> [, ... [, <Parameter N>]])
PHP If this function is used in a PHP site, you cannot specify the parameters to pass to the server event "Receive files uploaded". This feature is not supported in PHP.
Observaciones

Operating mode of the file upload performed via the Upload control

Several events are associated with the Upload control (single or multi-file):
  • For a single-file Upload control, these events are associated with the "Send" button.
  • In the case of a multi-file Upload control, these events are associated with the "Add" button.
The events used when uploading the selected files are:
  • Browser event "Progress of transfer":
    This event is called regularly during the upload to update a progress bar, if available.
  • Server event "Receive files uploaded":
    This event is executed when all the files are received by the server.
    Remark: If the UploadStart function is called with additional parameters, these parameters are passed on to the "Receive files uploaded" event. To retrieve these parameters, a procedure must be declared in this event (via the PROCEDURE statement).

Limits

Changes made in the server event "Receive files uploaded" are NOT carried over to the browser. These modifications will be visible during the next display of the page.

Tamaño máximo de los archivos a cargar

Por Default, el tamaño de los archivos a cargar no está limitado en el motor WEBDEV. Este tamaño puede estar limitado por el WEBDEV Application Server.
El archivo no se cargará si su tamaño supera el tamaño límite.
Para modificar el tamaño máximo de los ficheros a subir en el WEBDEV Application Server, hay que modificar el registro en el servidor:
  1. Para cambiar el tamaño de los archivos cargados para todas las aplicaciones WEBDEV 2025, seleccione la siguiente tecla:
    • 32 bits: HKEY_LOCAL_MACHINE\SOFTWARE\PC SOFT\WEBDEV\30.0
    • 64 bits: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\PC SOFT\WEBDEV\30.0
  2. Añadir la cadena MAX_UPLOAD. El valor de esta cadena será el tamaño máximo de los archivos a subir (en KB).
PHP Límites en PHP:
  • El tamaño de los archivos subidos está limitado por la directiva "upload_max_filesize" del archivo de configuración de PHP (archivo php.ini).
  • La carga de archivos debe estar permitida por el servidor PHP. Para ello, la directiva "file_uploads" debe estar en "on" en el fichero de configuración de PHP (fichero php.ini).
  • La directiva upload_tmp_dir del archivo de configuración debe especificarse hacia un directorio con derechos de lectura/escritura.
Componente: WDJS.DLL
Versión mínima requerida
  • Versión 15
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local