11-27-2019, 09:39 AM
(11-27-2019, 09:11 AM)Alexandre Machado Wrote: How are you using it?
Hi Alexandre, to evaluate the function I just added a logging line to this event handler (I looked at a Github demo and saw that it seemed to be a class method, I also tried with (Sender as TIWFileUploader).CheckMimeType(), but it was the same):
Code:
procedure TBaseClientImportWebDialog.FileUploaderWebFrameFileUploaderAsyncUploadCompleted(
Sender: TObject; var DestPath, FileName: string; var SaveFile, Overwrite: Boolean);
begin
inherited;
FileName := 'Import' + ExtractFileExt(FileName);
ImportFileName := DestPath + FileName;
ReportInformation('Mime type: ' + TIWFileUploader.CheckMimeType());
end;In 15.1.7 I get a log entry "Mime type: application/zip" when tested on an Excel file, but in 15.1.9 (when I was hoping to test the improved Excel detection) I got as said several access violations. Also tried with a text file with the same result.

