Function __global->post_param_multi_source_upload
Definitions
sources/uploads.php
- An upload has been passed through by POST, either as a file (a new upload), a URL, or as a filedump reference.For images use post_param_image instead.Used with form_input_upload_multi_source.Get the file URL from the POST data.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $name | ID_TEXT | No | No | required parameter | N/A | N/A | Form field prefix (input type suffixes will be added automatically) |
| $upload_to | ?PATH | No | No | required parameter | N/A | N/A | Where to upload to (null: the correct place for $theme_image_type) |
| $required | boolean | No | No | True | N/A | N/A | Whether an image is required |
| $is_edit | boolean | No | No | False | N/A | N/A | Whether this is an edit operation |
| &$filename | ?string | Yes | No | Null | N/A | N/A | Pass the filename back by reference (null: do not pass) |
| &$thumb_url | ?string | Yes | No | Null | N/A | N/A | Pass the thumbnail back by reference (null: do not pass & do not collect a thumbnail) |
| $upload_type | integer | No | No | 15 | N/A | N/A | A CMS_UPLOAD_* constant |
| $copy_to_server | boolean | No | No | False | N/A | N/A | Whether to copy a URL (if a URL) to the server, and return a local reference |
| $obfuscate | integer | No | No | 0 | N/A | N/A | Whether to obfuscate file names so the URLs can not be guessed/derived (a OBFUSCATE_* constant) |
Returns
- The URL (either to an independent upload, or the theme image, or a filedump URL) (null: leave alone, when doing an edit operation)
- Type: ?URLPATH
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* An upload has been passed through by POST, either as a file (a new upload), a URL, or as a filedump reference.For images use post_param_image instead.Used with form_input_upload_multi_source.Get the file URL from the POST data.
*
* @param ID_TEXT $name Form field prefix (input type suffixes will be added automatically)
* @param ?PATH $upload_to Where to upload to (null: the correct place for $theme_image_type)
* @param boolean $required Whether an image is required
* @param boolean $is_edit Whether this is an edit operation
* @param ?string $filename Pass the filename back by reference (null: do not pass)
* @param ?string $thumb_url Pass the thumbnail back by reference (null: do not pass & do not collect a thumbnail)
* @param integer $upload_type A CMS_UPLOAD_* constant
* @param boolean $copy_to_server Whether to copy a URL (if a URL) to the server, and return a local reference
* @param integer $obfuscate Whether to obfuscate file names so the URLs can not be guessed/derived (a OBFUSCATE_* constant)
* @return ?URLPATH The URL (either to an independent upload, or the theme image, or a filedump URL) (null: leave alone, when doing an edit operation)
*/
function post_param_multi_source_upload(string $name, ?string $upload_to, bool $required = true, bool $is_edit = false, ?string &$filename = null, ?string &$thumb_url = null, int $upload_type = 15, bool $copy_to_server = false, int $obfuscate = 0) : ?string
* An upload has been passed through by POST, either as a file (a new upload), a URL, or as a filedump reference.For images use post_param_image instead.Used with form_input_upload_multi_source.Get the file URL from the POST data.
*
* @param ID_TEXT $name Form field prefix (input type suffixes will be added automatically)
* @param ?PATH $upload_to Where to upload to (null: the correct place for $theme_image_type)
* @param boolean $required Whether an image is required
* @param boolean $is_edit Whether this is an edit operation
* @param ?string $filename Pass the filename back by reference (null: do not pass)
* @param ?string $thumb_url Pass the thumbnail back by reference (null: do not pass & do not collect a thumbnail)
* @param integer $upload_type A CMS_UPLOAD_* constant
* @param boolean $copy_to_server Whether to copy a URL (if a URL) to the server, and return a local reference
* @param integer $obfuscate Whether to obfuscate file names so the URLs can not be guessed/derived (a OBFUSCATE_* constant)
* @return ?URLPATH The URL (either to an independent upload, or the theme image, or a filedump URL) (null: leave alone, when doing an edit operation)
*/
function post_param_multi_source_upload(string $name, ?string $upload_to, bool $required = true, bool $is_edit = false, ?string &$filename = null, ?string &$thumb_url = null, int $upload_type = 15, bool $copy_to_server = false, int $obfuscate = 0) : ?string

