Add file to Custom Property

Bill Vlahos bvlahos at mac.com
Sat Mar 13 15:23:49 EST 2010


Jeff,

Thanks. That seems to do it.
on mouseUp
   answer file "Please select a file..."
   put it into lFileToRead
   -- Read the binary contents of a file into a variable
   open file lFileToRead for binary read
   read from file lFileToRead until end
   close file lFileToRead
   set the uFileStore of me to it
end mouseUp

I don't think I need to do the Base64 encoding. You are correct I didn't have any code for encrypting but I know how to do that.

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")


Bill Vlahos

On Mar 13, 2010, at 11:25 AM, Jeffrey Massung wrote:

> lFileToRead is the name of the file, not the data that was read from the file. Use 'it' to access the data that was read from lFileToRead. 
> 
> And, as a side note given the first sentence of your email... base64 encoding is not a form of encryption, nor is it a type of compression. Base64 encoding is a means of taking binary data and turning it into something that can be sent via email, posted to a website, etc (read: no spaces, line feeds, nulls, etc).




More information about the use-livecode mailing list