Screen: ShopSite > Utilities > Database > Upload/Download

MIME Encoded XML Upload

When using the dbupload.cgi program to automatically upload data to your ShopSite store, the XML file must contain the essential MIME Encoding (this is not required if the XML file has already been uploaded to ShopSite's HTML Output directory.)

Example MIME Encoded File

The following example illustrates the format for the MIME Encoded data. Note that the first several sections contain the options for dbupload.cgi, and the final one contains the XML data to be imported into ShopSite.

-----------------------------ShopSiteUpload_$
Content-Disposition: form-data; name="clientApp"

1
-----------------------------ShopSiteUpload_$
Content-Disposition: form-data; name="dbname"

products
-----------------------------ShopSiteUpload_$
Content-Disposition: form-data; name="uniqueName"

Name
-----------------------------ShopSiteUpload_$
Content-Disposition: form-data; name="batchsize"

500
-----------------------------ShopSiteUpload_$
Content-Disposition: form-data; name="newRecords"

yes
-----------------------------ShopSiteUpload_$
Content-Disposition: form-data; name="use_optimizer"

no
-----------------------------ShopSiteUpload_$
Content-Disposition: form-data; name="defer_linking"

no
-----------------------------ShopSiteUpload_$
Content-Disposition: form-data; name="Desktop" filename="drive:\dirpath\filename.xml"
Content-Type: text/xml

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE ShopSiteProducts PUBLIC "-//shopsite.com//ShopSiteProduct DTD//EN" "http://www.shopsite.com/XML/1.2/shopsiteproducts.dtd">
<ShopSiteProducts>
<Response>
<ResponseCode>1</ResponseCode>
<ResponseDescription>success</ResponseDescription>
</Response>
<Products>
<Product>
<Name>product-name</Name>
     etc.
</Product>
</Products>
</ShopSiteProducts>

-----------------------------ShopSiteUpload_$--

After importing the MIME Encoded XML file to ShopSite, the upload program will return a string of variables. These variables must be passed to the dbmake.cgi program exactly as they were returned:

http://mystore.domain/cgi-path/dbmake.cgi?return_string

Back to Automated XML Upload/Download


ShopSite Help and Resource Center
Last updated: March 01, 2010
Give Feedback


ShopSite Shopping Cart Software