-
Posts
356 -
Joined
-
Last visited
-
Days Won
18
Content Type
Profiles
Forums
Events
Posts posted by Oliver Morsch
-
-
I wish my customers can select where to save file he want before download from server,I have put a saveDialog in the form,but when the the saveDialog is executed ,it display in the server ,not in the browser.
Which browser?
-
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.
-
You need websockets or long polling or ...
-
Yes.
-
Make a Field / Property in TUniMainModule class.
- 1
-
I would use numeric or decimal data type for such a value.
-
TDirectory.GetDirectories
-
Use http://www.example.com?id=12345and then UniApplication.Parameters.Values['id'];
-
"Access-Control-Allow-Origin" is for XHR.
If you use subdomains you can use
<script>document.domain = 'example.com'</script>
for sub1.example.com and sub2.example.com. See here.
And here are additional informations: https://benohead.com/cross-document-communication-with-iframes/
-
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.
-
Hi Oliver,
an example?
Thanks...
AFAIR I use long polling in this project:
-
You can integrate long polling in an uniGUI app. No need for an extra server.
-
Instead of polling every second you can use long polling, web sockets, ...
-
You can only use file upload to show client files. You get no access to file system of client.
-
Only possible solution is "multiple file select".
https://stackoverflow.com/questions/1593225/how-to-select-multiple-files-with-input-type-file
You must integrate this in uniGUI - if possible.
-
Use the windows explorer to drag & drop the files into the blue area.
http://fmprime.com/ipbuploads/monthly_02_2013/post-147-0-05956800-1359728114.png
-
If it is a console app you can use CreateProcess. Or see here: http://forums.unigui.com/index.php?/topic/3529-webcmd-start-a-command-line-console-app-in-browser-interactive/?fromsearch=1
-
For the answer see #2. You must edit the DataSet.
-
You must use UniDataModules, not normal DataModules.
-
UniMainModule.onDestroy ?
-
I think you have to check on server side if the file was uploaded before (is already in the upload folder).
Or you must develop and install a client software.
-
Do you have database components on ServerModule? That is the wrong place...
-
You can use port 80 (if not in use), then you need no port by accessing.
-
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;
tunidblookupcombobox listsource open
in General
Posted
Make it like wilton_rad explained. I do the same.