TempUploadCmd
will upload file to a file system with a unique
generated filename. Note that this is not registered in URLREG or CMREG.
TempUPloadCmd is not intended to be used directly, it should be extended by
other commands. There is no access control management. If your command extends
the 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 store_id retrieved from command context i.e. the store that you logon to filepath is user input.
To write your command which extend TempUploadCmd, requires setting up attachment configuration section in the instance file.
<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 an URL which can be called to retrieve the attachment (attachmenturl).
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT IBM copyright notice field |
static java.lang.String |
defaultCommandClassName default class name |
Method Summary | |
---|---|
long |
getAttachmentOwner() Gets the owner_id of the uploaded attachment . |
java.lang.String |
getAttachmentURL() Gets the attachment URL where the attachment is uploaded . |
java.lang.String |
getFileName() Gets the File name of the uplaoded attachment. |
long |
getFileSize() Gets the file size of the uploaded attachment |
java.lang.String |
getUrl() Gets the return URL of the command. |
Methods inherited from interface com.ibm.commerce.command. ControllerCommand |
checkPermission,
execute,
getGeneric,
getRequestProperties,
getResolvedRequestProperties,
getResponseProperties,
getRetriable,
getViewInputProperties,
isGeneric,
isRetriable,
mergeProperties,
setGeneric,
setRequestProperties,
setRetriable,
setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command. AccCommand |
accessControlCheck,
getAccCheck,
getForUserId,
getResourceOwners,
setAccCheck,
setForUserId,
setOwner |
Methods inherited from interface com.ibm.commerce.command. ECCommand |
checkIsAllowed,
checkResourcePermission,
createCommandExecutionEvent,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
performExecute,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties,
validateParameters |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String defaultCommandClassName
Method Detail |
---|
public java.lang.String getUrl()
public java.lang.String getAttachmentURL()
public long getAttachmentOwner()
public long getFileSize()
public java.lang.String getFileName()