Add file to Custom Property

zryip theSlug zryip.theslug at gmail.com
Sat Mar 13 18:38:53 EST 2010


2010/3/14 Sarah Reichelt <sarah.reichelt at gmail.com>:
>> Next is how do I open the file saved? I don't really want to write it to disk for security reasons unless I need to.
>>
>> This statement doesn't work.
>>   open (URL "binfile:" & uFileStore of button "Save File")
>
> If you use:
>   put the uFileStore of button "Save File" into tMyData
>
> that is exactly the same as reading the original file into a variable.
> What you do with it then depends on what sort of data it is.
>
> If it's a text file, you can just "put" the data into a field.
> If it's a picture file, you can "put" it into an image.
>
> HTH,
> Sarah

And for more complex file, if you need to restore the file in the same
integrity than you store it, you need to encode it in base64.
Especially if you want to store app in the custom property.

It's the same principle than storing a file in a blob (if needed, have
a look to the Experiment 004 : Store a file in a database blob and
restore the file on the disk in my website)


Regards,
-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc



More information about the use-livecode mailing list