Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IW15 FileUplader and GetUploadedFileMimeType
#9
(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.
Reply


Messages In This Thread
RE: IW15 FileUplader and GetUploadedFileMimeType - by magosk - 11-27-2019, 09:39 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)