Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F77280735
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, Aug 13, 14:20
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Aug 15, 14:20 (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
19849638
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