Hello, I want to check real file type (File Headers) before upload it, is it possible with unigui on Client Side?
Okay. You can try this approach:
1.
procedure TMainForm.UniFormReady(Sender: TObject);
begin
UniFileUploadButton1.JSInterface.JSCode(#1'._checkFile = function(){'#1'.fileInputEl.dom.addEventListener("change", function(e){var accepted = ajaxRequest('#1', "checkFile", {fileName: e.target.files[0].name}, false).responseText == "true"; if (accepted == false){e.stopPropagation()}})};'#1'._checkFile();');
end;
2.
procedure TMainForm.UniFileUploadButton1AjaxEvent(Sender: TComponent;