Upload snapshot image from flash to server

Today i wanted to upload a captured image from a movieclip in a flash movie to a rails server. there are some task to complete to to this.

1. Flash Upload
I found a really nice und usefull class this morning. you can capture a bitmap image from a movieclip or from webcam and send it t othe server. it is possible to add other parameters. the class creates a request like the FileReference class would do. on server side it looks the same.


2. save image in rails
i’m totally new to RubyOnRails but my first impression is really great. you can do everything in few lines of code. for upload und processing of images i found the paperclip gem and this two great tutorials:



3. deal with the session problem

rails uses a cookie based session and if you upload files with flash this cookie is not send. the solution for this problem is this gem:

for more information you can read here:
rails 3 or
rails 2.3

all together works like a charm.

Comments are closed.