Page 1 of 1

Create and write to file. LiveCode Server

Posted: Wed Jan 11, 2017 5:20 pm
by Gurgen
Hi all,

I'm using Livecode server to keep and give access to client data. So I have base64 encoded zip file in SFTP server, that I need to decode and unzip. Is there any way to write decoded zip file into server file?

I'm looking for a similar syntax like in LC IDE

Code: Select all

put myData into URL ("file:" & tURL)


Thanks,
Gurgen

Re: Create and write to file. LiveCode Server

Posted: Wed Jan 11, 2017 5:25 pm
by Klaus
Hi Gurgen,

you could use:
...
put myData into URL ("file:a_zip_archive.zip")
...
Then the server will save this ZIP into the same folder as the CGI (.lc file) resides.
Or (create and) use a subfolder.
No idea if you can write outside of this folder.


Best

Klaus

Re: Create and write to file. LiveCode Server

Posted: Thu Jan 12, 2017 11:54 am
by Gurgen
Thank you Klaus,
It works.