Home | Search | Login | RSS
We have 1080 members and counting!
Next Page

1

Previous Page

Thread: FMS File Class binary content to ByteArray

Created on: 02/11/10 10:37 AM

Replies: 4

mhbn17





Joined: 06/06/09

Posts: 4

FMS File Class binary content to ByteArray
02/11/10 10:37 AM

Is there a way to store binary contents of a file inside a local FMS variable using file class?

Link | Top | Bottom

VincentMeens





Joined: 02/01/10

Posts: 33

RE: FMS File Class binary content to ByteArray
02/11/10 11:37 AM

Hello,


indirectly you could use fileObject.readByte() to map all bytes, but I strongly suggest against it. FMS's nature is that it's a streaming interactive server and not a regular file server like apache.

For one, I don't know what you exactly want to, but for instance manipulate the file, this is nothing for FMS and should be handled by an application server (PHP/ASP whatever which are optimized to handle and manipulate the file system).


Or maybe you want to serve files like images trough FMS to a client, this is also a bad idea and should be handled by a normal http server (which is optimized to do so).


Vince

Link | Top | Bottom

mhbn17





Joined: 06/06/09

Posts: 4

RE: FMS File Class binary content to ByteArray
02/11/10 10:58 PM

Thank you for the reply, Vince.

What I am trying to do is upload a recorded FLV file in the FMS directory to another file server meant for direct http download.

I am trying to send the FLV data, if ever possible, as a native AS object to the destination file server which implements amfphp. I believe this approach would significantly lower bandwidth cost and lower server load for my paid FMS subscription.

Link | Top | Bottom

VincentMeens





Joined: 02/01/10

Posts: 33

RE: FMS File Class binary content to ByteArray
02/12/10 4:51 PM

Ok, well in theory you probably should have gotten FTP access to the application directory of your paid FMS subscription service (Since you need to upload your own .asc files or prerecorded streams). As mentioned earlier FMS doesn't have any obvious tools to achieve this, though I don't say it can't be done, but it would be highly inefficient.


So in case you do have the FTP access it's a fairly trivial operation. I'd suggest using PHP (Since it has an easy ftp module) or whatever runs on your HTTP server and write a script that transfers the file from the FMS to the HTTP server.
In the server side action script you then trigger this script upon record completed with a "LoadVars" call and a parameter with the stream name to transfer. (The transfering then happens in the background, so the user recording can safely disconnect).

Link | Top | Bottom

mhbn17





Joined: 06/06/09

Posts: 4

RE: FMS File Class binary content to ByteArray
02/15/10 12:31 AM

I am not sure if Influxis allows FTP access to their application directories. Nevertheless its a very good suggestion. I'll post updates.

Link | Top | Bottom

Next Page

1

Previous Page

New Post

Please login to post a response.