Reference > Shop flow URLs > Catalog subsystem URLs > File upload
CatalogFileUpload URL
This URL uploads the catalog file in CSV format.
URL structure
- http:// host_name/path/
- The fully qualified name of the WebSphere Commerce Server and the configuration path.
name-value pair with the & character. For a detailed description of the parameters and their values, see the list entitled Parameter values." />
Parameter values
- filename
- Required: The local file name to be uploaded.
- URL
- Required: The URL to be called when the command completes successfully.
- errorURL
- Required: The URL to be called if the command fails.
- storeId
- Required: The store's reference number associated with the catalog file being uploaded. Note that this parameter is optional if the store ID is available in the command context.
- fileType
- The file type. Only CSV is supported.
- encoding
- The encoding for the file. While the default encoding is UTF8, other values are supported, for example, 8859-1, GB2312, Big5, and so on.
Example
This example uploads a catalog CSV file into the WebSphere Commerce Server:
http://host_name/webapp/wcs/stores/servlet/CatalogFileUpload?filename= E:\catalog.csv&encoding=UTF-8&storeId=1&fileType=CSV&URL= CatalogUploadView&errorURL=CatalogUploadErrorView
Behavior
- The mandatory parameters are verified to be complete.
- The destination directory is verified and ensure there are permissions to write to it.
- The file is saved in the WebSphere Commerce Server location.
- An entry is created in the FILEUPLOAD database table to track this new uploaded file.
Exception conditions
- The command throws an ECApplicationException when the following errors occur:
- Whenever the mandatory parameters are not passed into the command.
- When the fileType or file extension is not a supported file for upload.
- When the file size of the file being uploaded exceeds the maximum upload file size defined in the WebSphere Commerce configuration file.
- When the target directory does not have write permissions.
Related reference
ScheduledCatalogFileProcess URL