Create and write to file. LiveCode Server

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Gurgen
Posts: 34
Joined: Thu Dec 10, 2015 2:09 pm

Create and write to file. LiveCode Server

Post by Gurgen » Wed Jan 11, 2017 5:20 pm

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

Klaus
Posts: 14198
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Create and write to file. LiveCode Server

Post by Klaus » Wed Jan 11, 2017 5:25 pm

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

Gurgen
Posts: 34
Joined: Thu Dec 10, 2015 2:09 pm

Re: Create and write to file. LiveCode Server

Post by Gurgen » Thu Jan 12, 2017 11:54 am

Thank you Klaus,
It works.

Post Reply