ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Web-specific functions / Upload functions
  • In which event should I use this function?
  • Maximum size of files to upload
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
Returns the total size (in bytes) of the file currently uploaded via an Upload control. For a multi-file Upload control, this size corresponds to the sum of individual sizes of each file.
Example
// -- Event "Progress of transfer"
// Displays the total size in KB
STC_TotalSize = Round(UploadSize(MySelf) / 1024, 0) + "KB"
// -- Event "Progress of transfer"
// Displays the number of bytes sent according to the total size to send
STC_UploadMulti_Global = Round(UploadSizeSent(MySelf) / UploadSize(MySelf) * 100) + "%"
Syntax
<Result> = UploadSize(<Upload control>)
<Result>: Integer
Total size of files to upload (in bytes)
<Upload control>: Control name
Name of the Upload control to be used.
Remarks

In which event should I use this function?

UploadSize can only be used in the browser event "Progress of transfer". This event is associated:
  • to the "Send" button for a single-file Upload control.
  • to the "Add" button for a multi-file Upload control.
Used in another event, UploadSize will return 0.

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 files to upload in WEBDEV Application Server, the registry must be modified on the server:
  1. To modify the size of the uploaded files for all the WEBDEV 2024 applications, select the following key: HKEY_LOCAL_MACHINE\SOFTWARE\PC SOFT\WEBDEV\29.0 on a 32-bit computer and HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\PC SOFT\WEBDEV\29.0 on a 64-bit computer.
  2. Add the MAX_UPLOAD string. The value of this string will be the maximum size of files to upload (in KB).
Related Examples:
Uploading or Downloading a file 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
Component: WDJS.DLL
Minimum version required
  • Version 15
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help