c# - Get original file extension and content type -


suppose have file name test.txt. if change extension of file .xls.

now file name test.xls instead of test.txt.

then how can know original file type of file?

you can't. there no way retrieve previous extension or content type file.

you can try parse file (for example pdf documents start %pdf), isn't real solution in opinion, since need know format of each , every file format.


Comments

Popular posts from this blog

Prolog - Listing -

python - can't seem to get an output from my class -

orchardcms - change base url in local copy in Orchard CMS -