Troubleshooting: File upload

By default, WebSphere Commerce allows you to upload a file of up to 10 MB in size. You can upload a file where the size exceeds the limit by changing the maximum upload size.

  1. Update the WebSphere Commerce configuration file:
    1. Open the WebSphere Commerce configuration file in a text editor.
    2. Within the Attachment element, locate the Command and Attachment elements corresponding to the type of file you are attempting to upload and change the value of its maxuploadsize attribute as follows:
      <Command maxuploadsize="
      new_size" name="
      command_name" .../>
      <Attachment maxuploadsize="new_size">

      where new_size is the size you want (in bytes) and command_name is one of StoreBannerUpdate, StoreLogoUpdate, ContractUpload, and so on, as applicable.

    3. Save your changes and close the file.
  2. Update the file size in the object definition files:
    1. Update the following files to indicate the new file size:
      • For uploaded file assets: WC_demo.ear/LOBTools.war/WEB-INF/src/xml/commerce/attachment/objectDefinitions/ManagedFilePrimaryObjectDefinition.xml
      • For uploaded catalog assets: WC_demo.ear/LOBTools.war/WEB-INF/src/xml/commerce/catalog/objectDefinitions/CatalogImportPrimaryObjectDefinition.xml
    2. Save your changes and close the files.
  3. Update the WebSphere Web server plug-in configuration file:
    1. open the WebSphere Web server plug-in configuration file, WAS_installdir/config/cells/plugin-cfg.xml, for editing.
    2. Locate the ServerCluster element for your server cluster and change the value of its PostSizeLimit attribute as follows:
      <ServerCluster ... Name="
      cluster_name" PostSizeLimit="
      new_size" ...>

      where cluster_name is cell_name _ instance_name_Cluster and new_size is the desired size (in bytes) as before. For more information about editing the plug-in configuration, see the Manually editing the plug-in configuration topic.

    3. Save your changes and close the file.
  4. Restart the Web server and your WebSphere Commerce instance to apply the changes.