Jan 28, 2018 10:39 AM|PatriceSc|LINK
For a given type a file often starts with a given https://en.wikipedia.org/wiki/List_of_file_signatures
You could perhaps check for this and if it doesn't match assume it is encrypted. Only your server side code will handle those encrypted files? Another option could be to use some naming convention.
Not sure for a "raw" algorithm but encryption tools such as PGP are likely adding their own header to the encrypted content.