how to use WC base command UploadToStreamCmd - Websphere

This is a discussion on how to use WC base command UploadToStreamCmd - Websphere ; I'm wondering if somebody can help me find out the interfact to use WC base command UploadToStreamCmd. The WC online-help says that all I need to put the following in the config.xml and extend the base command. maxuploadsize="100000000"> name="MyUploadCmd" supportedFileExtension="txt,xls" ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: how to use WC base command UploadToStreamCmd

  1. how to use WC base command UploadToStreamCmd

    I'm wondering if somebody can help me find out the interfact to use WC base command UploadToStreamCmd. The WC online-help says that all I need to put the following in the config.xml and extend the base command.

    maxuploadsize="100000000">
    name="MyUploadCmd"
    supportedFileExtension="txt,xls"
    uploadReturnURL_enabled="false"
    viruscheck="no" />


    By checking out the source code, I believe UploadToStreamCmd will need a UploadedFile object already constructed in the request properties before being invoked. The API lists the constructor of UploadedFile as below. What kind of input parameters in the JSP should be coded in order to have such an uploaded file in the request properties? It doesn't look like that the extended command should construct the UploadedFile in the first place.

    public UploadedFile(java.lang.String filename,
    java.lang.String type,
    MultipartInputStreamHandler in,
    java.lang.String boundary)

  2. Re: how to use WC base command UploadToStreamCmd

    Actually I have figured it out. The enctype must be in the form for WC built-in command to pares the file input into an InputStream.

    ENCTYPE="multipart/form-data"

+ Reply to Thread