\Ansel_View_Upload

The Ansel_View_Upload:: class provides a view for handling image uploads.

Copyright 2010-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.

Summary

Methods
Properties
Constants
__construct()
run()
handleLegacy()
No public properties found
No constants found
_doCarouselSetup()
_handleFileUpload()
_isMetaFile()
$_params
$_gallery
$_forceNoScript
$_haveCarousel
N/A
_handleZip()
No private properties found
N/A

Properties

$_params

$_params : array

Type

array

$_forceNoScript

$_forceNoScript : boolean

Force the older, non-javascript uploader view.

Type

boolean

$_haveCarousel

$_haveCarousel : boolean

Flag for when we already output the carousel code.

Type

boolean

Methods

__construct()

__construct(\<type>  $params = array()) 

Initialize the view. Needs the following parameters: <pre> 'browse_button' - Dom id of button to open file system browser.

'target' - Url of the target page to upload images to. 'drop_target' - Dom id of the element to receive drag and drop images (If runtime supports it). 'gallery' - The gallery id we are uploading to.

Parameters

\ $params

run()

run() 

handleLegacy()

handleLegacy() 

Handle uploads from non-js browsers

_doCarouselSetup()

_doCarouselSetup() : string

Return javascript needed to initialize the carousel.

Returns

string —

The javascript code.

_handleFileUpload()

_handleFileUpload() 

Checks for a file uploaded via the pluploader. If one is found, handle it, send the server json response and exit.

_isMetaFile()

_isMetaFile(string  $filename) : boolean

Indicates if the specified filename is a known meta file type.

Parameters

string $filename

Returns

boolean

_handleZip()

_handleZip(string  $filename) : array

Handle extracting images from uploaded zip files.

Parameters

string $filename

The local path to the zip file.

Throws

\Ansel_Exception

Returns

array —

An array of the resulting image_ids.