+813-444-3589 +49-231-976765-0 +49-231-976765-0 | Contact

Batch uploading of content

Uploading content to FlickRocket is quite easy using either the FlickRocket Content Tools or the web based uploader.

But what do you do if you want to upload hundreds or thousands of content items? Well, for that case the uploading process can be automated. How this works and what to consider when doing so is something I want to explain in this post.

The batch file and FlickRocket Content Tools

Batch uploading is done via a regular batch file which repeatedly (once for every product) starts the FlickRocket Content Tools with the following two parameters:

  • 1st parameter: Path to the location for the XML file which defines the product and points to the actual content items to be uploaded.
  • 2nd parameter: “-silent” makes sure the uploader terminates itself after the job completion to be ready to process the next upload.

A typical batch file which uploads two products would look as follows:

echo start batch > Uploadbatch.log
"%LOCALAPPDATA%\flickrocket content tools\bin\FlickRocketContenttools.exe" "%~dp0Upload.xml" -silent
echo Uploader Error code: %errorlevel% for Upload.xml >> Uploadbatch.log
"%LOCALAPPDATA%\flickrocket content tools\bin\FlickRocketContenttools.exe" "%~dp0Upload_2.xml" -silent
echo Uploader Error code: %errorlevel% for Upload_2.xml >> Uploadbatch.log

The echo lines are only there to create a log file about the upload process. You can leave them away but they are typically very helpful.

The other thing you probably notice is the “%~dp0” preceding the file name of the XML file. It is replaced with the current path of the batch file and so the lines above assume that the xml files exist in the batch of the batch file. However, it could be any other path also.

Now, the most complex part is the XML file which defines the process. Besides the actual files to be uploaded if contains virtually all the information about the related product creation.

Note: It is strongly recommended to put in all the data about the product at this time as this way you save a lot of work which otherwise you have to do manually later.

You can download a sample XML with comments about the nodes from this link and in case you use Attributes you can download the additional Attributes XML from this link. It is commented and should be fairly self-explanatory.

Errors

If an upload fails, an error code from the following list is reported:

Error CodeErrorDescription
0No errorEverything went well.
-1Update errorUploader cannot continue because it requires an update
-2FailedA generic error occured
-3CancelledThe process was cancelled by the user
-4Account upgrade required An account upgrade is required. Proabably the current account type has ready a limitation
-5Project already existsA product with identical name and version already exists  
-6CrashThe uploader crashed and no more infromation is available. If this happens repeatedly, please contact support.
-7Invalid fileThe file path (movie, cover, pictures) specified for upload is invalid
-8Invalid XMLThe XML files contains errors. It cannot be parsed or not all required information exists.
-9Product not foundThe (existing) product which is referenced in the XML does not exist
-10Name too longThe name for the product is too long
-11Description too longThe description for the product is too long
-12No name / No descriptionNo name and/or description exists in the XML 
-13Content type mismatchThe content to be uploaded is not of the same type as the existing content. e.g. this would happen if you upload an HD file for an SD file or a PDF for a video.
-14No source fileThe file to be uploaded could not be accessed.


Note: If no error is returned and the Uploader just displays “Please wait”, this typically means that the XML file couldn’t be accessed.