Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following describes how the Upload-module works and how an ERP system can fetch the Upload-files from the shop server via SFTP.

Upload

...

products

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

Upload-ID / Position-ID

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

...

  • Upload-ID (Upload-ID of an order)

    • finished.sync (Finished-file)

    • upload.log (Log-file)

    • fileinfo.dat (Info-file)

    • Position-ID1 (Upload-ID of the 1st position)

      • 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:

...

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)

File "finished.sync"

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.

...

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 orderer. The file is saved in TSV format (tab as field separator) and contains the following fields:

...

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 delete front.pdf 0708D800 905B1908
19/12/2011 09:22 File upload upload front1.pdf 0708D800 905B1908
2011/12/19 09:22 File upload 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:

...