Function __global->get_url
Definitions
sources/uploads.php
- Get URLs generated according to the specified information. It can also generate a thumbnail if required. It first tries attached upload, then URL, then fails.
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: array
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$specify_name | ID_TEXT | required parameter | N/A | N/A | The name of the POST parameter storing the URL (if '', then no POST parameter). Parameter value may be blank. |
$attach_name | ID_TEXT | required parameter | N/A | N/A | The name of the HTTP file parameter storing the upload (if '', then no HTTP file parameter). No file necessarily is uploaded under this. |
$upload_folder | ID_TEXT | required parameter | N/A | N/A | The folder name where we will put this upload |
$obfuscate | integer | 0 | N/A | N/A | Whether to obfuscate file names so the URLs can not be guessed/derived (a OBFUSCATE_* constant) |
$enforce_type | integer | 15 | N/A | N/A | The type of upload it is (bitmask, from CMS_UPLOAD_* constants) |
$make_thumbnail | boolean | False | N/A | N/A | Make a thumbnail (this only makes sense, if it is an image) |
$thumb_specify_name | ID_TEXT | Blank (empty string) | N/A | N/A | The name of the POST parameter storing the thumb URL. As before |
$thumb_attach_name | ID_TEXT | Blank (empty string) | N/A | N/A | The name of the HTTP file parameter storing the thumb upload. As before |
$copy_to_server | boolean | False | N/A | N/A | Whether to copy a URL (if a URL) to the server, and return a local reference |
$accept_errors | boolean | False | N/A | N/A | Whether to accept upload errors |
$should_get_something | boolean | False | N/A | N/A | Whether to give a (deferred?) error if no file was given at all |
$only_make_smaller | boolean | False | N/A | N/A | Whether to apply a 'never make the image bigger' rule for thumbnail creation (would affect very small images) |
$member_id | ?MEMBER | Null | N/A | N/A | Member ID to run permissions with (null: current member) |
$upload_folder_full | ?PATH | Null | N/A | N/A | Full path to upload folder, in case it is not relative to the base directory (null: work out) |
$thumb_folder_full | ?PATH | Null | N/A | N/A | Full path to thumb folder, in case it is not relative to the base directory (null: work out) |
$filename | ?string | Null | N/A | N/A | Filename to use (null: choose one) |
Return
- An array of 4 URL bits (URL, thumb URL, URL original filename, thumb original filename)
- Type: array
- Set: N/A
- Range: N/A