Open daltonkell opened 4 years ago
you can test that theory by making the extension lower case right?
Yeah, I believe it should be an easy fix! There's also the possibility to add in some more robust checking, e.g. looking at the file header.
so it does work if you rename the file?
It does work, yeah
You might want to check the first few bytes of the file (aka "magic" in Unix) instead of or in addition to checking the file extension.
For example:
[badams@localhost]~/devel/glider-dac% file ~/Downloads/UW157-20141116T2118_f7fa_a808_6f48.nc
/home/badams/Downloads/UW157-20141116T2118_f7fa_a808_6f48.nc: NetCDF Data Format data
[badams@localhost]~/devel/glider-dac% head -c20 ~/Downloads/UW157-20141116T2118_f7fa_a808_6f48.nc
CDF
@benjwadams this is exactly what I had in mind!
Attempting to upload
Stoch_Images.NC
results in the following error:The file is, in fact, an HDF5 file:
The Compliance Checker CLI has no trouble checking the file.
This error is likely due to checking files purely based on extensions, where
.NC
(all-caps) is not allowed.