Open paulyoung84 opened 3 weeks ago
Steps to reproduce: 1) Create a plain text file 2) Change its extension to be PDF
Such file is neither identified by signature nor by extension. Run such file through internal API and you will notice that the extension of he file is not reported
This is more complicated. If you look at this class uk.gov.nationalarchives.droid.internal.api.ApiResult
you will notice that the class contains all the returned values, however when there is no successful identification, there is no IdentificationResults
object at all, hence no other details too.
I guess the best option is for the caller of the API to extract the extension from the request.
API does not return a value for extension when it is unidentified, it does in UI and cmd line DROID. Example attached.