New topic: 

create file and download - Web Edition

<http://forums.realsoftware.com/viewtopic.php?t=47690>

         Page 1 of 1
   [ 5 posts ]                 Previous topic | Next topic          Author  
Message        shahiddarbar          Post subject: create file and download - 
Web EditionPosted: Wed Apr 24, 2013 9:26 am                         
Joined: Wed Nov 17, 2010 10:49 am
Posts: 38                Hi, 

To create a text file in a variable (webfile). 

To ask the download location (with SaveAs dialog - yes in web edition)

Save the file on client. 

All these in Web Edition. 

Thanks,   
                             Top                Akiland          Post subject: 
Re: create file and download - Web EditionPosted: Wed Apr 24, 2013 9:43 am      
                           
Joined: Tue Jan 04, 2011 3:02 am
Posts: 1204
Location: Jönköping, Sweden                shahiddarbar wrote:Hi, 
To create a text file in a variable (webfile). 
To ask the download location (with SaveAs dialog - yes in web edition)
Save the file on client. 
All these in Web Edition. 
Thanks,

Simply put your textfile in a WebFile and present it to the client.
Pseudo code.
yourWebFile = WebFile.Open(f) '<--Folderitem to your textfile.
yourWebFile.MIMEtype = "text/plain"
yourWebFile.ForceDownload = True
ShowURL YourWebFile.URL


Remember to put "yourWebFile" in the Session or it might die too soon.

Where the file will be saved on the clients computer depends on their browser 
settings     
_________________
 http://www.linkedin.com/in/albinkiland
Dev. iMac 27" + 2x22" LG (2.8GHz Intel Core i7, 12GB RAM, 120GB SSD) OS X 10.8
REAL.Studio Web Edition 2011r3  
                             Top                shahiddarbar          Post 
subject: Re: create file and download - Web EditionPosted: Wed Apr 24, 2013 
9:50 am                         
Joined: Wed Nov 17, 2010 10:49 am
Posts: 38                can we get a saveas dialog so they can select where to 
save?

also, there is no physical file on server, the new file has to be created on fly

is this possible?   
                             Top                shahiddarbar          Post 
subject: Re: create file and download - Web EditionPosted: Wed Apr 24, 2013 
10:29 am                         
Joined: Wed Nov 17, 2010 10:49 am
Posts: 38                ok, 

I am getting saveas box (not saveas dialog) on atleast opera and IE, safari and 
chrome save to default download location. 



Is there a way to create a text webfile in code?


thanks,   
                             Top                Akiland          Post subject: 
Re: create file and download - Web EditionPosted: Wed Apr 24, 2013 12:54 pm     
                            
Joined: Tue Jan 04, 2011 3:02 am
Posts: 1204
Location: Jönköping, Sweden                If you don't have a file on the 
server, see WebFile.Data
You can't decide where the client will save the file. It's all in the control 
of "the client".
Personally I've set my browser to automatically download all downloadable files 
into a predefined directory so I never see the SaveAs Dialog. This setting 
can't be forced     
_________________
 http://www.linkedin.com/in/albinkiland
Dev. iMac 27" + 2x22" LG (2.8GHz Intel Core i7, 12GB RAM, 120GB SSD) OS X 10.8
REAL.Studio Web Edition 2011r3  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 5 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to