c# - Validate file type by base64 string -
i writing web api accepts file base64 string , converts 2 dimentional array. 1 of requirements verify file of type excepted , should done validating file base64 string. example validation pdf. how xlsx & csv?
if (file.take(7).sequenceequal(pdf)) { mime = "application/pdf"; }
Comments
Post a Comment