This content has been marked as final. Show 9 replies
After you run this:
<cfset FaceImg = toString(toBinary(FaceImg.BLOB))>
If you run this:
<cfdump var = "#FaceImg#">
what do you see?
Hi Dan, I see a lot of characters. Now, I see the variable being passed to my action page, but the problem is that it seems to only have a shorted portion of the variable, seems that some of the content got cut off.
I wonder if you may be running into some kind of field or form length
restriction, which could be in the browser, web server or application
But I have been unable to find any readily available information on this.
Assuming you actually succeed, what are you going to do with this variable on your action page? If the intent is to display the image again, there are probably better ways to do it.
Ok a little more research has turned up this info for IIS.
POST data is limited to 2 MB on IIS 4.0, and 128 KB on IIS 5.0. Each
name/value is limited to 1024 characters, as imposed by the SGML spec.
Of course this does not apply to files uploaded using
See KB #260694 [ http://support.microsoft.com/default.aspx/kb/260694 to
learn how to adjust the limits of POST data (this deals with
adding/modifying MaxClientRequestBuffer in the registry).
In IIS 6.0 (Windows Server 2003), you can adjust this setting in the
metabase. You need to increase the setting for
AspMaxRequestEntityAllowed to allow larger files to be handled by the
Request object. Look for this setting in metabase.xml; the default is
204,800 (200 kb), but you can change it to reflect your expected usage.
You will need to restart IIS for this change to take place, unless
"enable direct metabase edit" is enabled.
I would suspect there are similar concerns with other web servers. And
as earlier mentioned, browser limits may play into this as well.
Hi Dan, what I want to do is save the binary data to the database. Basically, this is how my program goes: 1. I display image 2. User click's "Save Image" and then my form submits to an action page that saves Image to my personal database. When user is at the form, he or she already has access to the blob so I was just wondering how I can get this blob to the action page so that I can save it to my db?
Your original post start with, "Hi, I get a image blob from database". So you already have it.
Then you say, "what I want to do is save the binary data to the database".
How does your desired end result differ from what you have to start with?
It might be shorter doing it the longer way, like this
Hi Dan, Ian, and BKBK, thank you so much for your reply's, what a learning experience this is, I'm really enjoying working with Coldfusion, I have to absorb your replies and reply back if I get any issues.
Thanks again for your awesome help!