Sometimes you may need to know a state or server response for each uploaded package or file (if every file is uploaded in a separate request). It may be useful to implement the following functionalities:

  • Send the next file depending on the upload result of previous ones;
  • Save the upload list before sending of each file to provide users with possibility of recovering the upload process even through Image Uploader was reloaded. Read more about this functionality in the Restoring Upload Pane Content topic;
  • Show uploaded thumbnails to users right after files are saved on a server.

To handle package upload Image Uploader provides the PackageXXX events:

These events can be compared with the similar ones used to handle the whole upload process:

Each pair (BeforeUpload and PackageBeforeUpload, AfterUpload and PackageComplete, Error and PackageError, Progress and PackageProgress) works in the similar manner with only one difference. PackageXXX events fire for each package inside the current upload session and provide the additional parameter PackageIndex to determine the index of the current processed package.

By the way, these event pairs can work equally if all the files are sent in the single package (i.e. if the FilesPerOnePackageCount is -1).