A J
A J

Reputation: 11

Validate file completeness?

For typical filetypes (pdf, doc, docx, xls, jpeg,gif etc) that get uploaded in lot of web applications, what is the best way to validate the completeness of the file. Uploads may get interrupted for some reason or other and I will end up with a few incomplete files. I wish to weed-out these files from some further batch/asynchronous processing. Some filetypes seem to have some sort of inherent trailer information in them that can be used to confirm the completeness. Rather than looking at file format of each filetype, wondered if this is already figured by someone. If I can help, I would rather not use a separate signal file but just use the actual files to identify this.

Upvotes: 1

Views: 165

Answers (1)

Dave
Dave

Reputation: 11899

I guess a trival solution would be to just rename or move the files once they were completed, this would be an atomic action, and would let you know everything had finished properly.

Upvotes: 1

Related Questions