Class SweetDevRia.FileUpload
allowing upload file on server
Defined in: FileUpload.js.
Constructor Attributes | Constructor Name and Description |
---|---|
<private> |
Method Attributes | Method Name and Description |
---|---|
<private> |
accept(filename)
Filter a file name selected by the user according to the regexp supplied
|
This method is called after sending the request for the file deletion
To be overridden !!
|
|
This method is called after having started a file upload
To be overridden !!
|
|
This method is called before deleting an uploaded file
To be overridden !!
|
|
This method is called before starting an upload file
To be overridden !!
|
|
Action triggered on the Delete link.
|
|
<static> |
SweetDevRia.FileUpload.extractFileName(filename)
Extract the file name from this full path
|
<private> |
Return the input element
|
<private> |
Return the text of the fileupload element
|
Return the input element content
|
|
<private> |
getLink()
Return the link element
|
IS the file uploaded or not ?
|
|
<private> |
loaded(index, name)
Called by the server on upload file complete.
|
Action triggered after the process of deletion has been performed on the server.
|
|
onFilterFail(filename)
This method is called after the filter fail on matching a file
Does nothing by default
|
|
setRegexpFilter(filter)
Set a regexp as a filter
|
|
setSimpleFilter(filter)
Set a pattern as a simple filter (managing *, ?)
Convert it as a real regexp for further use
|
|
<private> |
upload()
Function uploading a file
|
Method Detail
<private>
{boolean}
accept(filename)
Filter a file name selected by the user according to the regexp supplied
- Parameters:
- {String} filename
- the full path of the filename being filtered
- Returns:
- true if the filename validate the filter, false otherwise
afterDelete()
This method is called after sending the request for the file deletion
To be overridden !!
afterUpload()
This method is called after having started a file upload
To be overridden !!
{boolean}
beforeDelete()
This method is called before deleting an uploaded file
To be overridden !!
- Returns:
- True if this method can be called, else false.
{boolean}
beforeUpload()
This method is called before starting an upload file
To be overridden !!
- Returns:
- True if this method can be called, else false.
deleteFile()
Action triggered on the Delete link. Delete an uploaded file.
<static>
{String}
SweetDevRia.FileUpload.extractFileName(filename)
Extract the file name from this full path
- Parameters:
- {String} filename
- the full path file name
- Returns:
- the file name extracted
<private>
{HTMLElement}
getInputFile()
Return the input element
- Returns:
- Return the input element
<private>
{HTMLElement}
getInputFileText()
Return the text of the fileupload element
- Returns:
- Return the text of the fileupload element
{String}
getInputFileValue()
Return the input element content
- Returns:
- Return the input element content
<private>
{HTMLElement}
getLink()
Return the link element
- Returns:
- Return the link element
{boolean}
isUploaded()
IS the file uploaded or not ?
- Returns:
- Return the state of the upload
<private>
loaded(index, name)
Called by the server on upload file complete.
- Parameters:
- {int} index
- the number count of the file uploaded
- {String} name
- the name of the fileupload
onDeleteFile()
Action triggered after the process of deletion has been performed on the server.
To be overridden.
onFilterFail(filename)
This method is called after the filter fail on matching a file
Does nothing by default
- Parameters:
- {String} filename
- the filename failing To be overridden !!
setRegexpFilter(filter)
Set a regexp as a filter
- Parameters:
- {String} filter
- the filter
setSimpleFilter(filter)
Set a pattern as a simple filter (managing *, ?)
Convert it as a real regexp for further use
- Parameters:
- {String} filter
- the filter
<private>
upload()
Function uploading a file