Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Param Name

Type

Description

Default Value

Callback Required

max_size

Number

Max upload file size in kb, set null for unlimited file size

NULL

No

max_file

Number

Max files you can upload each time using upload form

1

Yes

type_list

Array

List file extensions are allowed to upload

N/A

No

type_list_string

String

String contain list file type is allowed to upload

image/jpeg,image/png,image/gif

No

upload_dir

String

Directory storage uploaded files on your site

N/A

Yes

upload_path

String

Full path to storage location

N/A

Yes

thumbnail_sizes

Array

Use when upload image, list thumbnail size you want to crop from original image

array()

No

label

String

Upload field's label in your form

_p('photo')

No

upload_now

String

Set "true" for auto upload file when drop file into upload section, set "false" to upload manual when click submit form

"true"

Yes

submit_button

String

Element Id of submit upload button, it is required when you set upload_now is "false"

N/A

No

upload_icon

String

Font icon class name of select file button

ico ico-upload-cloud

No

param_name

String

Name of your input file field

file

Yes

field_name

String

Field name will be add after upload temporary file

temp_file

Yes

remove_field_name

String

Name of remove input, use to check when remove uploaded file

remove_photo

No

upload_url

String

Full path to component process your upload file, default will use upload temp file component of Core

Phpfox::getLib('url')->makeUrl( 'core.upload-temp', array('type' => $sType,'id' => $iId ))

No

max_size_description

String

Description for max upload file size

N/A

No

style

String

Style of upload form, set empty to use full size upload form or set mini to use small form

N/A

Yes

component_only

Boolean

Set true is you want to use upload form component without show current image

false

No

is_required

Boolean

Set true if your upload file is required, we will mark require symbol for your field, and don't allow to delete current photo

false

No

on_remove

String

Ajax function name will be call when click remove icon after select files

core.removeTempFile

No

js_event

Array

Associate array with: key is event (sending, success, queuecomplete, removedfile, addedfile, error) name will be trigger, value is JS function will be execute when correspond event is trigger

N/A

No

extra_data

Array

Associate array contain extra data

N/A

No

first_description

String

First description about your upload section

N/A

No

type_description

String

Description about your allow upload file type

N/A

No

max_size_description

String

Description about your max upload file size

N/A

No

extra_description

Array

Array for other description

N/A

No

use_browse_button

Boolean

Show Browse... button or not

N/A

No

keep_form

Boolean

Doesn't change form after drop file or not

N/A

No

preview_template

String

Html contain preview file after selected

N/A

No

Look at style parameter, do you wonder what's difference between *mini form style with full size form style? Ok, let's see:*

...