Jump to content

Oliver Morsch

uniGUI Subscriber
  • Posts

    356
  • Joined

  • Last visited

  • Days Won

    18

Posts posted by Oliver Morsch

  1. THANKS,I will my user can select where to save the file and can set the file name.and I know how to download the file.

     

    You can only initiate a download. File save dialog depends on browser setting. In Chrome there is no option for this, other browsers have it.

  2. i think Didier would like to have a method for sending the html source code of a page that is loaded in a UniUrlFrame to the App unigui.

     

    for example, open the sample of unigui desktop "URLFrame" , launch the app,  navigate to an adress in the app -> how to recover the html source code that is contained in the uniUrlFrame1 ? and how send it to the main app ?

     

    UniUrlFrame uses an iFrame. And the browser prevents accessing an iframe, when it conflicts with the "same origin policy". This is for security in web (XSS, ...). So you can't get the html code.

  3. Okay clarified my doubt !!! But would you have some way to rename or delete this file from the client machine ???

     

    You get no access to client files. What if any website could delete your files?

     

    Why do you need that? Maybe there is another way.

     

    And if I want to save this file from the fileupload to another folder other than temporary file, would it have to do ???

    procedure TMainForm.UniFileUpload1Completed(Sender: TObject; AStream: TFileStream);
    var
      DestName : string;
      DestFolder : string;
    begin
      DestFolder := UniServerModule.StartPath + 'UploadFolder\';
      DestName := DestFolder + ExtractFileName(UniFileUpload1.FileName);
      CopyFile(PChar(AStream.FileName), PChar(DestName), False);
      ShowMessage('File ' + UniFileUpload1.FileName + ' Uploaded to folder ' + DestFolder);
    end;
    
×
×
  • Create New...