New topic: 

to Select and Upload a file(any file perhaps)

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

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        terreywe          Post subject: to Select and Upload a file(any 
file perhaps)Posted: Thu Mar 21, 2013 2:29 pm                         
Joined: Wed Oct 31, 2012 11:21 pm
Posts: 7                Hi guys,

stuck on trying to use folderitem options....mainly for selecting a 
file/doc/pic, and assigning it for an item.

So basically, for wanna allow user to select pictures, and files/manuals to go 
with a product....then upload/assign them,so we will save those files somewhere 
specific to be retrieved.

so once the the product is established, they can "Select" the files needed for 
it, then "upload" to associate it with the products.

my issue, cant figure out a general way to get this done....manage to make it 
work with pictures, by drawing it to canvas, then saving it. e.g.:

*******to select a picture*********
  Dim k As FolderItem
  Dim p4 As Picture
 
  k = GetOpenFolderItem("????")
  if k <> nil then
  p4 = k.OpenAsPicture
  
   
  pic4 = NewPicture( p4.Width * factor, p4.Height * factor, 32 )
  pic4.graphics.DrawPicture p4, 0,0,pic4.width,pic4.height, 
0,0,p4.width,p4.height
  
  Canvas5.Refresh
  end if

*************to save the picture somewhere specific************

  Dim k as FolderItem
  dim x as string
  k=GetSaveFolderItem("jpeg","Pic3.jpeg")
  
  
  if k <> Nil then
  pic4.Save(k,picture.SaveAsJPEG)
  MsgBox k.Name
  k.CreateAsFolder
  //MsgBox k.AbsolutePath
  filepath5.text = k.AbsolutePath //just for storing the path for product 
relation.
  end if
  return
*************************

the trick here is using the canvas as a middle man to store da picture....but 
now we want to upload anything (docs/xls/pdf/jpeg etc etc), so i dont think i 
can use this method, so how should i be doing this?
 

is there a way to do this in a more direct manner? not sure where to start with 
this? SaveAsDialog?

Appreciate any kinda help, or pointers about this....

Thanks   
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
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