I’m looking for a recommendation for an application which needs to
upload files. The deal is, these are files the application needs to
upload to the RoR server app without prompting the user, so we don’t
do any sort of browse.
The files could be anything: image, audio, video, swf, or even raw
bitmap data from a clipboard paste. They become “assets” in our
application, with a unique ID attached, a user-defined label, and
another model which relates the asset ID’s to the object ID’s which
contain the assets on the screen (think of this as a drawing
application using some external assets).
So, my current attempt uses two models: one for the assets which has a
file attachment, the label, etc. and one for the asset-to-object
relation which is a one-to many relationship between asset ID’s and
object ID’s. That’s all I’m trying to work with at the moment but once
I sort that out I’ll be going further.
I’m trying to use Attachment Fu on the RoR side and File.upload on the
AS side, and I have a little application which works for doing the
kind of upload/update via a web browser RoR form, but not when using
the Actionscript. I’m using the CD cover example from the Advanced
Rails Recipes book.
I can find plenty of examples which simply upload files to rails, but
there has to be a better way in which I can use something akin to an
http service connection in Actionscript to get the files uploaded
along with their asset data (and later, the id’s of the objects which
use them for the other model).
Is this an esoteric case? I hope not. If you have any recommendations,
please offer them up. Thank you !