UploadToStreamCmd
will upload the file to an inputstream. Note
that this is not registered in URLREG. UploadToStreamCmd is not intended to be
used directly, it should be extended by other commands. It will return an
inputstream, the command which uses the UploadToStreamCmd can convert the input
stream to whatever format that is necessary for their own use.
This is not recommended for uploading a very large file, there may be performance issue.
Note that if the uploaded file is a jar/zip we will not check if the jar or zip contains any files that have file extensions that are not supported.
There is no access control management. If your command extends the UploadToStreamCmd, you should implement your own access control checking
To write your command which extend UploadToStreamCmd, 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>
Returns the input stream used to upload the file (inputstream).
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT IBM copyright notice field |
static java.lang.String |
defaultCommandClassName default class |
Method Summary | |
---|---|
long |
getAttachmentOwner() |
java.io.InputStream |
getAttachmentStream() |
java.lang.String |
getFileName() |
long |
getFileSize() |
java.lang.String |
getUrl() |
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.io.InputStream getAttachmentStream()
public long getAttachmentOwner()
public long getFileSize()
public java.lang.String getFileName()