Function __global->handle_upload_syndication

Definitions

sources/upload_syndication.php

  • Do upload syndication (after an upload has been received, in-context).
  • 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 Upload field name
$title string No No required parameter N/A N/A Title associated with the upload
$description string No No required parameter N/A N/A Description associated with the upload
$url URLPATH No No required parameter N/A N/A URL to the upload (should be local, if it isn't we'll return quickly without doing anything)
$filename ID_TEXT No No required parameter N/A N/A Filename
$remove_locally_if_no_quota boolean No No required parameter N/A N/A Whether to delete the local copy, if the current user has no upload quota. If no syndication was set, an error will be given.

Returns

  • New URL (if we deleted the local copy, it will be a remote URL)
  • Type: URLPATH
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Do upload syndication (after an upload has been received, in-context).
 *
 * @param  ID_TEXT $name Upload field name
 * @param  string $title Title associated with the upload
 * @param  string $description Description associated with the upload
 * @param  URLPATH $url URL to the upload (should be local, if it isn't we'll return quickly without doing anything)
 * @param  ID_TEXT $filename Filename
 * @param  boolean $remove_locally_if_no_quota Whether to delete the local copy, if the current user has no upload quota. If no syndication was set, an error will be given.
 * @return URLPATH New URL (if we deleted the local copy, it will be a remote URL)
 */

function handle_upload_syndication(string $name, string $title, string $description, string $url, string $filename, bool $remove_locally_if_no_quota) : string