Skip to main content
TomSchober
Participant
November 1, 2007
Question

CF8: CFIMAGE and CFFILE upload

  • November 1, 2007
  • 1 reply
  • 677 views
I am uploading a decently large image (3-4mb) via CFFILE.

<cffile action="upload"
filefield="file"
destination="#ExpandPath('\')#gallery\images"
nameconflict="makeunique"/>

Using the CF Function ImageRead, I am reading that file back into memory to do a ImageScaleToFit to create a thumbnail.

The problem is, ImageRead is SO SLOW! Is there anyway to read the image directly from the fileField of the upload instead of writing it to disk and then re-reading it back into memory?
This topic has been closed for replies.

1 reply

Inspiring
November 2, 2007
TomSchober wrote:
> Is there anyway to read the
> image directly from the fileField of the upload instead of writing it to disk
> and then re-reading it back into memory?
>

CF = server
<input type='file'> = client

no, there is no way to do what you want with just CF.

--

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com
TomSchober
Participant
November 2, 2007
It seems a waste to have the image data in memory from the http request, have to write it to disk, and immediately read it back into memory. It's a major bottleneck. Any other suggestions outside of CF?