The Internet is not always a dependable environment. A connection may fail from time to time. Due to networking issues the data you transfer may be distorted or partially lost. It may become a major issue when you transfer large amounts of business-critical data.
With Aurigma Image Uploader, you can eliminate these problems and upload files in a robust, reliable manner. Let's examine how Aurigma solves issues that may arrise.
Automatic Upload Recovery
It is very frustrating when you upload a lot of files and the connection drops in the middle of the upload process for some reason. You have to start from a scratch, select files for upload again, and wait until the end of upload to make sure the upload completed successfully.
Fortunately, you can configure Aurigma Image Uploader to restore broken uploads. You can specify how many upload attempts Image Uploader should make and how long to wait between attempts. And of course, if you send multiple files and the upload breaks in the middle of the process, Aurigma will continue the upload from the point at which the files fail. No need to re-upload those files which had been successfully sent.
Moreover, if you upload files of large size, you can configure Image Uploader to split the HTTP request into chunks of smaller size. It allows you recovering the upload of the partially uploaded file.
Imagine, your user have a file of 100 MB size. You configure it to split the uploaded data to 1 MB chunks. Instead of sending large 100 MB request, Image Uploader will submit 100 small requests. If the upload fails after 90 MB is already received by the server, the user will not have to re-upload the entire file from a scratch. Only remaining 10 MB should be uploaded.
Learn how to configure automatic upload recovery in Aurigma Image Uploader
Verifying Uploaded File Integrity
How you can ensure the file you received on the server is the same as the file uploaded from a client? The general approach is to calculate some value based on the file content (checksum), and send it along with the file. On the server, you just calculate the checksum based on the same algorithm, and compare it with the checksum uploaded along with a file. If they are equal, the file is deemed to be undistorted.
Image Uploader allows you to implement this scheme. You can configure it to generate a hash value based on the file content. This hash can be calculated with one of the well-known algorithms - MD5, MD2, or SHA1. Most server platforms have means to do the same on the server side. In particular, if you are using Image Uploader ASP.NET control or PHP library, this validation is already implemented.
Moreover, you can calculate hash values for each chunk instead of entire file. So if some chunk is corrupted, there is no need to resend the whole file, only specific chunk will be re-uploaded.
Important
If you are using ASP.NET control or PHP library, chunk processing is automatically handled. In this case you do not have to "glue" chunks together in your server code or verify the integrity. Our server-side API already take care about it for you!