WireUpload class

Located in file /wire/core/WireUpload.php

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the WireUpload class also inherits all the methods and properties of: Wire.

Show class?             Show args?        

Common

NameReturnSummary 
WireUpload::error($text)
Wire WireUploadRecord an error message 
WireUpload::execute()
arrayExecute/process the upload 
WireUpload::getCompletedFilenames()
arrayGet array of uploaded filenames 
WireUpload::getErrors()
arrayGet error messages 
WireUpload::getOriginalFilenames()
arrayGet unsanitized array of original filenames (basenames) indexed by completed basename 
WireUpload::getOverwrittenFiles()
arrayGet files that were overwritten (for overwrite mode only) 
WireUpload::isAjaxUploading()
boolIs an ajax upload request currently in progress? 
WireUpload::setAllowAjax()
$thisSet whether or not AJAX uploads are allowed 
WireUpload::setDestinationPath(string $destinationPath)
$thisSet the destination path for uploaded files 
WireUpload::setExtractArchives()
$thisSet whether or not ZIP files may be extracted 
WireUpload::setLowercase()
$thisSet whether or not lowercase is enforced 
WireUpload::setMaxFileSize(int $bytes)
$thisSet the max allowed uploaded file size 
WireUpload::setMaxFiles(int $maxFiles)
$thisSet the max allowed number of uploaded files 
WireUpload::setName(string $name)
$thisSet the upload field name (same as that provided to the constructor) 
WireUpload::setOverwrite(bool $overwrite)
$thisSet whether or not overwrite is allowed 
WireUpload::setOverwriteFilename(string $filename)
$thisSet the filename that may be overwritten (i.e. myphoto.jpg) for single uploads only 
WireUpload::setTargetFilename($filename)
(nothing)Set the target filename, only useful for single uploads 
WireUpload::setValidExtensions(array $extensions)
$thisSet allowed file extensions 
WireUpload::validateFilename(string $value)
bool stringSanitize/validate a given filename 
WireUpload::wired()
(nothing)Wired to API 

Additional methods and properties

In addition to the methods and properties above, WireUpload also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.236

Latest news

  • ProcessWire Weekly #518
    The 518th issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, sites, and more. Read on!
    Weekly.pw / 13 April 2024
  • ProFields Table Field with Actions support
    This week we have some updates for the ProFields table field (FieldtypeTable). These updates are primarily focused on adding new tools for the editor to facilitate input and management of content in a table field.
    Blog / 12 April 2024
  • Subscribe to weekly ProcessWire news

“Indeed, if ProcessWire can be considered as a CMS in its own right, it also offers all the advantages of a CMF (Content Management Framework). Unlike other solutions, the programmer is not forced to follow the proposed model and can integrate his/her ways of doing things.” —Guy Verville, Spiria Digital Inc.