Package com.ebasetech.xi.api.controls
Interface FileItem
public interface FileItem
FileItem represents an uploaded File using the
FileUploadControl.
The FileItem contains basic information regarding the file including the file name, file size and error status
-
Method Summary
Modifier and Type Method Description java.lang.StringgetErrorMessage()Returns the failure error message if the file fails to uploadjava.lang.StringgetFileName()Returns the file name of the file that is saved as on the server.java.lang.StringgetFilePath()Returns the full path to the uploaded filename on the serverlonggetFileSize()Returns the original file size of the file that the user uploaded.java.lang.StringgetRelativePath()Returns the relative path to the uploaded filename and the relative path to the base upload directoryjava.lang.StringgetStatus()Returns the status of the file upload.java.lang.StringgetUserFileName()Returns the original file name of the file that the user uploaded.booleanhasError()Returns true if the file fails to upload
-
Method Details
-
getFileName
java.lang.String getFileName()Returns the file name of the file that is saved as on the server. If replace duplicate is not selected a unique file will be created with _x appended to the original name. e.g myfile.txt is created as myfile_1.txt if the file already exists.- Since:
- V5.10
-
getUserFileName
java.lang.String getUserFileName()Returns the original file name of the file that the user uploaded.- Since:
- V5.10
-
getFileSize
long getFileSize()Returns the original file size of the file that the user uploaded.- Since:
- V5.10
-
getStatus
java.lang.String getStatus()Returns the status of the file upload. This can either be OK for success or FAILED for failure. Note that the error message contains the reason for the file upload failure- Since:
- V5.10
- See Also:
getErrorMessage(),Further documentation.
-
getErrorMessage
java.lang.String getErrorMessage()Returns the failure error message if the file fails to upload- Since:
- V5.10
- See Also:
getStatus(),Further documentation.
-
getFilePath
java.lang.String getFilePath()Returns the full path to the uploaded filename on the server- Since:
- V5.10
-
getRelativePath
java.lang.String getRelativePath()Returns the relative path to the uploaded filename and the relative path to the base upload directory- Since:
- V5.10
-
hasError
boolean hasError()Returns true if the file fails to upload- Since:
- V5.10
- See Also:
getStatus(),getErrorMessage()
-