Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Copyright WEBSALE AG 2010

- Confidential-
Transfer to third parties only allowed with written permission of WEBSALE AG.

- Confidential-
Transfer to third parties only allowed with written permission of WEBSALE AG.

General

The following describes how the upload module works and how an ERP system can fetch the upload files from the store server via SFTP.

Upload process

Upload products

In the store, upload products are marked accordingly. For each upload product, a customer can upload one or more upload files after the order process.

Upload ID / Item ID

As soon as an upload product is placed in the shopping cart, the store generates an upload ID once. This upload ID always remains the same during a session.
In addition, an item ID is generated for each upload product. If an upload product is subsequently deleted from the shopping cart, the associated item ID is also deleted.

For each upload ID and position ID, the store synchronously creates upload directories with the same name, in which the upload files are stored by the upload module.

The directory structure is as follows:
<upload root directory>.

  • Upload-ID (upload ID of an order)

    • finished.sync (Finished file)

    • upload.log (log file)

    • fileinfo.dat (info file)

    • Item-ID1 (upload ID of the 1st item)

      • Upload file1

      • Upload file2

      • ...

      • Upload fileN

    • Position-ID2 (Upload-ID of the 2nd position)

      • Upload file1

      • Upload file2

      • ...

      • Upload-fileN

  • ...

    • Position-IDN (Upload-ID of the N. position)

      • Upload file1

      • Upload file2

      • ...

      • Upload fileN

transfer of the Upload-ID / Position-ID in the order data

The ERP system is informed of the upload ID and position ID within the purchase order.
Extract from the order data:

<Order>
...
UploadID = 5DA7106A
...
</Order>
<OrderList>
<Item>
Number = 1234
Name = Product 1
UploadID = A882F49D (Position)

...
<Item>
<Item>
Number = 1111
Name = Product 2
UploadID = A22445566 (Position)
...
<Item>
<Item>
Number = 567890
Name = Product 3
UploadID = A22445566 (Position)
...
<Item>
<OrderList>

Based on this information, the ERP system can pick up the upload files for each order specifically via SFTP.

Administration files

In addition to the upload files, there are 3 administration files directly below the upload directory. These are:

  • finished.sync (completion file)

  • upload.log (log file)

  • fileinfo.dat (info file)

Finished.sync" file

Since the orderer can upload multiple files, he has to inform the upload module when he has finished uploading all files. For this purpose, the upload module creates a completion file named "finished.sync" in the upload directory associated with the upload ID.

A single line with the date and time of completion is written to this file. The format is "YYYY/MM/DD<space>HH:MM"
Example:
2013/03/27 18:57

Please note:
An ERP system is not allowed to collect the upload files via SFTP until the finished.sync file exists, i.e. the orderer has completed the uploads. For this purpose, the ERP system must implement a polling procedure for the finished.sync file.

File "upload.log

In addition, a log file named "upload.log" is written to the upload directory associated with the upload ID and the log data is displayed to the ordering party. The file is saved in TSV format (tab as field separator) and contains the following fields:

The first line contains the column names.

Column name

Description

Date

Date in the format DD.MM.YYYY

Time

Time in the format HH:MM

Type

Description of the transaction e.g. "File uploaded".

TechType

Technical, language independent description

File

Name of the file

The following "types" of actions are currently supported by the internal upload module:

Type

TechType

File deleted

delete

Uploads completed

finished

File uploaded

upload

File already exists

uploaddupfile

Unlocked (not used at the moment)

unlocked

Maximum size per file exceeded

filelimit

Maximum number of files per order item exceeded

poslimitcount

Maximum size per order item exceeded

limitmb

Incomplete data upload

uploaderror

From the 2nd line on the data follows. Example:
Date Time Type TechType File Upload-ID Position-ID
12/19/2011 09:21 File upload upload front.pdf 0708D800 905B1908
12/19/2011 09:21 File delete front.pdf 0708D800 905B1908
19.12.2011 09:22 File upload upload front1.pdf 0708D800 905B1908
2011/12/19 09:22 File upload back1.pdf 0708D800 905B1908
2011/12/19 09:23 Uploads completed finished 0708D800 905B1908

File "fileinfo.dat

The customer can select the content of the file via a select box for each upload file.
The file is saved in TSV format (Tab as field separator) and contains the following fields:

The 1st line contains the column names.

Column name

Description

File

Name of the upload file

ID

Integer Value. Position of the entry in the select box, starting from 0.
1. Position=0
2. Position=1
3. Position=2

etc.

Type

Language dependent entry in the select box. E.g.
- Please select (ID=0)
- All in one document (ID=1)
- Front page (ID=2)
- Back page (ID=3)
- Outside page(s) (ID=4)
- Inside page(s) (ID=5)
- Cover page(s) (ID=6)
- Info/View (ID=7)
- Multiple pack (ID=8)
- One file, print both sides (ID=9)

PosID

PositionID

Starting from the 2nd line, the data follows. Example:

File ID Type PosID
File1.pdf 0 Please select 696EE098
File2.pdf 1 All in one document 696EE098

Example directory after a completed upload:
<upload root directory>
0708D800 (Upload ID)

  • 905B1908 (Item ID)

    • Front1.pdf (Upload file)

    • Back1.pdf (upload file)

  • finished.sync (Finishing file)

  • upload.log (Log file)

  • fileinfo.dat (info file)

Please note:
After the ERP system has fetched the upload files via SFTP, the complete upload directory must be deleted by the ERP system via SFTP command. In addition, WEBSALE AG will delete all upload directories older than 6 weeks. (Clean up function of directory "corpses")

  • No labels