Thanks for your response. My answers inline..
Hi, I'm starting to look at uploading images to a web database.
What's a web database ?
Sorry, I should have termed it better - I did mean a web-enabled database. So, basically a MySQL database with a Rails app!
I understand that the first thing I need to use is file_column so tha
the images are not stored in the database itself, but in the file
system. Would I be right in saying that adding security to it
(protecting it from prying eyes) would only be a matter of adding a
before_filter to the system?
No. You have to store images outside RAILS_ROOT/public and use
send_file from controller after validating access.
Hmm, OK. Thanks for the pointer, will need to look into this!
My other main problem is regarding integration of this web database with
my Windows application. I want to do something like Picasa (I guess)
where people can partially edit the picture on their PC and then click
upload to send it to their web album. Does anyone have any references
on how data is transferred over HTTP to send and receive image files?
I'm reading this right now:
but if someone has a better reference, I'd seriously appreciate it.
You can probably try to use rmagick's to_blob function, then use Zlib
for compression and base 64 encode the data before transferring. But
I'm not sure if that'd improve the performance or not, logically it
should. You can use multipart post form for uploading and proper
content-type in http header for downloading the image.
Hmm.. In my case, the client is a C++ program that runs under Windows, so I'm going to have do most of that myself, I guess.. But, if I understand you correctly, what's needed is compression -> base64 encode and use a multipart form and proper content-typing...
Hmm, a bit of a handful, but thanks for the pointers.. time to start looking at these things then!