Set encoding type. Upload now works correctly. Refs #7636.

- Added `IsDataFile` method to detect if the file being uploaded is datafile, in order to set the correct mode.
Merge branch 'feature/7636_icat_publish' into develop