public interface TempUploadCmd extends ControllerCommand
This class will upload a file to a file system with a unique generated filename. Note that this is not registered in the URL configuration or the command configuration. This class is not intended to be used directly. It should be extended by other commands. There is no access control management. If your command extends TempUploadCmd, you should implement your own access control checking.
The filepath to be uploaded is $wcsstore\storename\filepath. $wcsstore is defined in instance configuration file. storename is based on the store_id retrieved from the command context, that is, the store that you logon to. filepath is user input.
To write a command that extends TempUploadCmd, the attachment configuration section in the instance file must be set up. For example:
<Attachment display="false" maxuploadsize="100000000"> <Command maxuploadsize="1000000" name="MyUploadCmd" supportedFileExtension="gif,jpg" uploadReturnURL_enabled="false" viruscheck="no" /> </Attachment>The result of the command is a URL which can be called to retrieve the attachment, that is, the attachmenturl.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field
|
static java.lang.String | defaultCommandClassName
This is the default class name
|
Modifier and Type | Method and Description |
---|---|
long | getAttachmentOwner()
This method gets the owner ID of the uploaded attachment.
|
java.lang.String | getAttachmentURL()
This method gets the attachment URL where the attachment is uploaded.
|
java.lang.String | getFileName()
This method gets the file name of the uploaded attachment.
|
long | getFileSize()
This method gets the file size of the uploaded attachment.
|
java.lang.String | getUrl()
This method gets the return URL of the command.
|
static final java.lang.String COPYRIGHT
static final java.lang.String defaultCommandClassName
java.lang.String getUrl()
java.lang.String getAttachmentURL()
long getAttachmentOwner()
long getFileSize()
java.lang.String getFileName()