Interrupted Upload

Top  Previous  Next

Whenever an upload is interrupted, the server has an incomplete set of PDF page files. An interrupt can result from an unexpected internet disconnection, or from a client PC shutting down during upload. The upload protocol has two parameters to handle resumed uploads in a failsafe manner:

TicketID: reentry ticket for a resumed upload. It must be unique and stored in the user table.
TicketValidDays: how many days the reentry ticket is valid
SessionID: returned by the login form ( and passed in and in ShopEntryURL. It must be unique and remembered only for the current upload session. It is used by the server to identify the (authorized) user a starting upload belongs to.

The ticket is similar to a movie ticket. You can leave the theater any time during the show, and can reenter with it. Only after the movie is done, you can discard the ticket. This is exactly how the Publisher works: it saves the TicketID inside an INI file and removes it only if the upload is successful. If the upload is interrupted, then the Publisher finds an open TicketID inside the INI file and asks you to resume the upload.

In the upload protocol, here's where the TicketID comes into use:

1.The Publisher asks the server for a new ticket when calling The server returns TicketID and TicketValidDays.
2.The Publisher calls with this ticket in order to initiate an upload (he enters the theater for the 1st time). If the ticket is expired, the server returns error 200, and the customer is notified that the ticket is no longer valid. A ticket should not be valid more than 7 days. This value must be defined on the server side and reported to the Publisher in TicketValidDays (see step 1).
3.When the upload is done, the Publisher calls with the ticket (the movie is over and he leaves the theater for good, discarding his ticket)
4.If an upload is interrupted, the Publisher calls the next with the old ticket (he gets a beer and reenters the theater with his existing ticket)

sign_warningThe upload communication is defined in the file Spec Upload Interface.pdf from the archive If you are designing your own backend, you will need to replicate this upload protocol.

2015 © 3P Photobook Publisher