maoanz
maoanz

Reputation: 151

Flex Write File

I checked in the API, that writing a file is only in Flex Air. Despite of that, is there still a way in Flex to write a file on the server or on the client machine ?

More concretely, it's because I have a String and I will decode it by mx.utils.Base64Decoder to a doc. And I need to open it by Word directly on the client side, or write it on the server and return the link to the client for downloading.

Thanks

Upvotes: 0

Views: 2863

Answers (2)

badmanj
badmanj

Reputation: 198

I'm doing something similar - I have built a custom grid in Flex that contains an additional button on it that allows the user to open the data up in Excel. I've done this by writing a function in PHP on the server which my Flex speaks to. This creates the CSV file on the server and the function passes the link back to the client, which in turn offers the user the chance to open the data up in Excel.

I'm using the Zend technologies to accomplish this - I recommend you take a look; they're extremely good. I used to use Flex Data Services and Java do do this but just recently switched to PHP because development time is cut down drastically as a result.

Hope this helps.

Jamie.

Upvotes: 1

dirkgently
dirkgently

Reputation: 111298

AIR applications run on the users' desktops. They allow you to write to the users' desktops. Nothing stops Flex/AIR applications from communicating to the server, write some files there (using a suitable backend technology) and return a link back to the user.

Upvotes: 0

Related Questions