开发者

Can I send a file to Flex using RubyAMF?

I'm generating a PNG file in Flex from graphics drawn by user. I would like to send the file to Rub开发者_JAVA技巧y on Rails backend and I'm using RubyAMF in other parts of the application.

I found ways to upload the file using FileReference which uses HTTP but I prefer to send using RubyAMF ,if possible, as it's more efficient.

If this is possible what is your suggested method?


Transferring image data such as png is not more efficient using AMF than plain old HTTP. Indeed, AMF itself sits on top of HTTP (in this context) so is another layer to go through before accessing the image data.

If you really want to use AMF to transfer binary data (and I strongly suggest you don't) then there is the ByteArray type. RubyAMF appears to support this type.

Also check this answer on how to convert this data in flash.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜