![]() |
Saving file from server to client's PC
I have recently stumbled across the selectFileForDownload(str) function with no surprise of not finding much documentation.
What I want to do is download a file from the server to my PC using a save file dialog-esk UI. This is what the function gives clientside for: selectFileForDownload("/levels/graphics/images/test.png"); http://i.imm.io/1hFlO.png When I click the save button, nothing happens and the function doesn't return anything. I haven't seen this function being used anywhere either... And the lack of documentation doesn't help. Is there another way to download a file from the server to a client's PC? I want to avoid uploading it to a web server and getting the client to download it from there... I have also tried different arguments for the function with no luck. |
i have no answer for this. but i would love to understand this function. that would be a amazing thing
|
That's a Client-RC function, and a terrible file browser.
With solely just script. PHP Code:
generatezipstring(obj) - returns string - creates a zip in memory from the array you provide like {filename, content, filename, content, ...}, save to file using str.savestring(filename, 0) decompressfile(str, str, str, int) - returns boolean - parameters are filename, file name pattern (*), destination folder and flags (1 (keep zip paths) + 2 (keep original modification time)); unzips a file into the specified folder |
Hm, ok. I will use savestring instead.
|
Now slightly off topic, but re: the original post, you can see how it's used in the graphic uploader I released (and Jer modified) on the Code Gallery.
|
| All times are GMT +2. The time now is 09:11 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.