Function __global->_get_upload_url

Definitions

sources/uploads.php

  • Converts an uploaded file into a URL, by moving it to an appropriate place.
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: array

Parameters

Name Type Default Set Range Description
$member_id MEMBER required parameter N/A N/A Member ID to check permissions with
$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
$upload_folder_full PATH required parameter N/A N/A Full folder path
$enforce_type integer 15 N/A N/A The type of upload it is (bitmask, from CMS_UPLOAD_* constants)
$obfuscate integer 0 N/A N/A Whether to obfuscate file names so the URLs can not be guessed/derived (a OBFUSCATE_* constant)
$accept_errors boolean False N/A N/A Whether to accept upload errors
$filename ?string Null N/A N/A Filename to use (null: choose one)

Return

  • A pair: the URL and the filename
  • Type: array
  • Set: N/A
  • Range: N/A