Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F103827116
PHUIFormFileControl.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Mar 4, 23:48
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Mar 6, 23:48 (2 d)
Engine
blob
Format
Raw Data
Handle
24673557
Attached To
rPH Phabricator
PHUIFormFileControl.php
View Options
<?php
final
class
PHUIFormFileControl
extends
AphrontFormControl
{
private
$allowMultiple
;
protected
function
getCustomControlClass
()
{
return
'phui-form-file-upload'
;
}
public
function
setAllowMultiple
(
$allow_multiple
)
{
$this
->
allowMultiple
=
$allow_multiple
;
return
$this
;
}
public
function
getAllowMultiple
()
{
return
$this
->
allowMultiple
;
}
protected
function
renderInput
()
{
$file_id
=
$this
->
getID
();
Javelin
::
initBehavior
(
'phui-file-upload'
,
array
(
'fileInputID'
=>
$file_id
,
'inputName'
=>
$this
->
getName
(),
'uploadURI'
=>
'/file/dropupload/'
,
'chunkThreshold'
=>
PhabricatorFileStorageEngine
::
getChunkThreshold
(),
));
return
phutil_tag
(
'input'
,
array
(
'type'
=>
'file'
,
'multiple'
=>
$this
->
getAllowMultiple
()
?
'multiple'
:
null
,
'name'
=>
$this
->
getName
().
'.raw'
,
'id'
=>
$file_id
,
'disabled'
=>
$this
->
getDisabled
()
?
'disabled'
:
null
,
));
}
}
Event Timeline
Log In to Comment