WebAssetsUploadCmd
will upload the webassets to the filesystem.
The location will be $wcsstore\storename\filepath\filename.
$wcsstore is from the instance's configuration file storename is based on the store_id from command context filepath is user specified filename is the file to be uploaded e.g. storelogo.gif and user can specify a rename (rename includes the file extension) myicon.gif then the uploaded file will be renamed to myicon.gif.
Note that no unique filename will be generated if the uploaded file already exists, it will be overwritten.
Note that this is not registered in URLREG/CMDREG, WebAssetsUploadCmd 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 WebAssetsUploadCmd, you should implement your own access control checking.
To write your command which extend WebAssetsUploadCmd, 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 implementation class of this comand |
Method Summary | |
---|---|
java.lang.String |
getAttachmentURL() Gets the URL of the uploaded file |
java.lang.String |
getUrl() Gets the return url when the upload is completed. |
Methods inherited from interface com.ibm.commerce.command. TempUploadCmd |
getAttachmentOwner,
getFileName,
getFileSize |
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()
getUrl
in interface
TempUploadCmd
public java.lang.String getAttachmentURL()
getAttachmentURL
in interface
TempUploadCmd