• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CF8: CFIMAGE and CFFILE upload

Community Beginner ,
Nov 01, 2007 Nov 01, 2007

Copy link to clipboard

Copied

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?
TOPICS
Advanced techniques

Views

635

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 01, 2007 Nov 01, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 02, 2007 Nov 02, 2007

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 02, 2007 Nov 02, 2007

Copy link to clipboard

Copied

LATEST
it's not a waste, it is just how things work.
cf has absolutely no idea about what's going on the client's machine.
are you sure it is imageREad that is "slow"? or maybe it just takes a
while for you to upload your file?

maybe some java applets or activeX controls can do it directly on client
side.... don't know of any though...

---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation