New topic: 

Saving to a specified folder

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

         Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic          Author  
Message        isomfield          Post subject: Saving to a specified 
folderPosted: Fri Aug 12, 2011 8:11 pm                         
Joined: Sun Oct 07, 2007 8:12 pm
Posts: 199
Location: Sydney, Australia                I am trying to save a PDF file 
created in my app, to a specific folder on the server - I am guessing it is 
simple but after reading all I can find, I simply can't do it.

Here is what I have so far:Code: dim f as FolderItem = GetFolderItem("test.pdf")
 dim bin as BinaryStream = BinaryStream.Create(f, true)
 bin.Write pdfdata
 bin.CloseThis will save the file "test.pdf" to the same directory as my app - 
but I want to put the file in a folder named "pdfs" that already exists, also 
in the same directory as my app.

I cannot get my head around this - I have tried all the "Parent.Child" 
permutations that I can think of - nothing has worked so far - I obviously just 
don't get it - can someone help please?      
_________________
Greg Olson-Hyde

RS 2011r2 Enterprise, Mac OS X 10.6.7  
                             Top                swort          Post subject: 
Re: Saving to a specified folderPosted: Sat Aug 13, 2011 1:24 am                
         
Joined: Mon May 31, 2010 5:35 am
Posts: 1393
Location: Netherlands                use Folderitem.Permissions = 0755 or check 
the documentation for that.

docs are here:
http://docs.realsoftware.com/index.php/Permissions
and here:
http://docs.realsoftware.com/index.php/ ... ermissions

I had the same problems when adding a folder (Folderitem.CreateAsFolder) and 
then add a DB into that.

The "owner" is the Web Application
The "group" should be you (sometimes it's the same as "owner" depends on server 
settings)
The "others" are anyone, note to this: if you set this to "read permissions" 
users can open/download those files from within the browser if they know the 
link. So DON'T place a DB and any sensitive content in such folder.

You should be able to try it... (not in debug, as it will be different from the 
server)      
_________________
SWORT™
- Windows Vista, Windows XP, Linux Ubuntu 10.04 LTS and iMac OSX 27"
- REAL Studio Enterprise(latest) and WEB Edition(latest)
- Plugins (almost all)
For Dutch User Groups ask me to enter!
Completely free functions by the community: 
http://forums.realsoftware.com/viewtopic.php?f=1&t=36396&hilit=dutchtools+free  
                             Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 2 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