Re: CFFILE action="upload"

2006-11-10 Thread coldfusion . developer
Awesome Feddback!!!  Thanks guys!

>I just posted this to the "cool things about cf" thread as an easy, useful
>example of java instantiation.
>
>
>function bhimginfo(imgfile){
>   jFileIn = createObject("java","java.io.File").init(imgfile);
>   ImageInfo = StructNew();
>   ImageObject =
>createObject("java","javax.imageio.ImageIO").read(jFileIn);
>
>   imageFile = CreateObject("java", "java.io.File"); 
>   imageFile.init(imgfile); 
>   sizeb = imageFile.length(); 
>   sizekb = numberformat(sizeb / 1024, "9.99");
>   sizemb = numberformat(sizekb / 1024, ".99");
>   
>   bhImageInfo = StructNew();
>   bhImageInfo.ImgWidth = ImageObject.getWidth();
>   bhImageInfo.ImgHeight = ImageObject.getHeight();
>   bhImageInfo.SizeB = sizeb;
>   bhImageInfo.SizeKB = sizekb;
>   bhImageInfo.SizeMB = sizemb;
>}
>
>
>It builds a structure called bhImageInfo that holds width, height and file
>size (b, kb, and mb) about the image passed to it.
>
>Just call it like so...
>
>#bhimginfo('d:\path\to\image.jpg')#
>
>Then dump bhimginfo to see everything returned
>
>Also... dump imageFile to see a TON of other methods/properties that could
>be used.
>
>
>
>
>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
>Sent: Friday, November 10, 2006 11:38 AM
>To: CF-Talk
>Subject: CFFILE action="upload"
>
>All,
>
>Does anyone know a way to check a image file's height and width before or
>after an image has been uploaded? I'm restrictinig the file type for *.jpg
>only.
>
>I want to take the height and width values of the image being uploaded and 
>see if the values fall within an acceptable height and width range.
>
>Thanks.
>
>D

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259928
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: CFFILE action="upload"

2006-11-10 Thread Bobby Hartsfield
I just posted this to the "cool things about cf" thread as an easy, useful
example of java instantiation.


function bhimginfo(imgfile){
jFileIn = createObject("java","java.io.File").init(imgfile);
ImageInfo = StructNew();
ImageObject =
createObject("java","javax.imageio.ImageIO").read(jFileIn);

imageFile = CreateObject("java", "java.io.File"); 
imageFile.init(imgfile); 
sizeb = imageFile.length(); 
sizekb = numberformat(sizeb / 1024, "9.99");
sizemb = numberformat(sizekb / 1024, ".99");

bhImageInfo = StructNew();
bhImageInfo.ImgWidth = ImageObject.getWidth();
bhImageInfo.ImgHeight = ImageObject.getHeight();
bhImageInfo.SizeB = sizeb;
bhImageInfo.SizeKB = sizekb;
bhImageInfo.SizeMB = sizemb;
}


It builds a structure called bhImageInfo that holds width, height and file
size (b, kb, and mb) about the image passed to it.

Just call it like so...

#bhimginfo('d:\path\to\image.jpg')#

Then dump bhimginfo to see everything returned

Also... dump imageFile to see a TON of other methods/properties that could
be used.




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 10, 2006 11:38 AM
To: CF-Talk
Subject: CFFILE action="upload"

All,

Does anyone know a way to check a image file's height and width before or
after an image has been uploaded? I'm restrictinig the file type for *.jpg
only.

I want to take the height and width values of the image being uploaded and 
see if the values fall within an acceptable height and width range.

Thanks.

D



~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259907
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFFILE action="upload"

2006-11-10 Thread Massimo Foti
> Search the archive, there was a discussion.. last week maybe... Massimo
> has a javascript that detects image dimensions BEFORE uploading.

http://www.massimocorner.com/validator/samples/image_upload.htm


> to check after, you can use image.cfc (www.opensourcecf.com/imagecfc) ..
> probably more reliable since it doesn't require javascript.

Definitely check on the server too. JavaScript is only the first line of 
defense


Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com



~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259905
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFFILE action="upload"

2006-11-10 Thread Gert Franz
If you are using Railo then you can use the tag  which returns the width and height of an image file if it is jpg or 
gif...

Greetings / GrĂ¼sse
Gert Franz
Customer Care
Railo Technologies GmbH
[EMAIL PROTECTED]
www.railo.ch

Join our Mailing List / Treten Sie unserer Mailingliste bei:
deutsch: http://de.groups.yahoo.com/group/railo/
english: http://groups.yahoo.com/group/railo_talk/



[EMAIL PROTECTED] schrieb:
> All,
>
> Does anyone know a way to check a image file's height and width before or
> after an image has been uploaded? I'm restrictinig the file type for *.jpg 
> only.
>
> I want to take the height and width values of the image being uploaded and 
> see if the values fall within an acceptable height and width range.
>
> Thanks.
>
> D
>
> 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259904
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFFILE action="upload"

2006-11-10 Thread Rick Root
[EMAIL PROTECTED] wrote:
> 
> Does anyone know a way to check a image file's height and width before or
> after an image has been uploaded? I'm restrictinig the file type for *.jpg 
> only.

Search the archive, there was a discussion.. last week maybe... Massimo 
has a javascript that detects image dimensions BEFORE uploading.

to check after, you can use image.cfc (www.opensourcecf.com/imagecfc) .. 
probably more reliable since it doesn't require javascript.

> I want to take the height and width values of the image being uploaded and 
> see if the values fall within an acceptable height and width range.

You could also just resize the image (using image.cfc) to fit within the 
range.

Rick

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259902
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFFILE action="upload"

2006-11-10 Thread Ryan Stille
[EMAIL PROTECTED] wrote:
> All,
>
> Does anyone know a way to check a image file's height and width before or
> after an image has been uploaded? I'm restrictinig the file type for *.jpg 
> only.
>
> I want to take the height and width values of the image being uploaded and 
> see if the values fall within an acceptable height and width range.
>
> Thanks.
>
> D
>
>   

If you are running ColdFusion MX, take a look at image.cfc.
http://www.opensourcecf.com/imagecfc/

-Ryan


~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259901
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


CFFILE action="upload"

2006-11-10 Thread coldfusion . developer
All,

Does anyone know a way to check a image file's height and width before or
after an image has been uploaded? I'm restrictinig the file type for *.jpg only.

I want to take the height and width values of the image being uploaded and 
see if the values fall within an acceptable height and width range.

Thanks.

D

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259898
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFFILE action = upload

2002-03-26 Thread Dave Carabetta

>has anyone experimented with the size of files that can be uploaded using
>cffile?
>
>Currently working on a document managment application and some fairly large
>files need to be uploaded and I was curious about the limitations of 
>cffile.
>
> >From a 'user experience' standpoint, i know i can use cfflush to present 
>the
>user with a "file uploading" type graphic or text, so that aspect can be
>taken care of for the large load time.
>
>Thanks for any and all help,
>

The file size is limited only by the amount of RAM your server has.

Remember that CFFILE works by first uploading or reading the file into the 
server's RAM and then performing the appropriate actions. Now you obviously 
have to keep in mind that larger files are a bit more intensive 
processing-wise on the server, but that doesn't effect the actual file size 
limitation...just your server's memory.

Regards,
Dave.


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



CFFILE action = upload

2002-03-26 Thread chris.alvarado

has anyone experimented with the size of files that can be uploaded using
cffile?

Currently working on a document managment application and some fairly large
files need to be uploaded and I was curious about the limitations of cffile.

>From a 'user experience' standpoint, i know i can use cfflush to present the
user with a "file uploading" type graphic or text, so that aspect can be
taken care of for the large load time.

Thanks for any and all help,

-chris.alvarado
[application.developer]
4 Guys Interactive, Inc.

__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



cffile action=upload error

2001-04-12 Thread Geoff Hoffman

I have designed some forms which allow the user to upload jpegs and 
QuickTime movies to the server. It was working before, but now I 
am getting the following error:

===
Error Occurred While Processing Request

Error Diagnostic Information

Request canceled or ignored by serverServer busy or unable to fulfill 
request. The server is unable to fulfill your request due to extremely 
high traffic or an unexpected internal error. Please attempt your 
request again (if you are repeatedly unsuccessful you should notify 
the site administrator). (Location Code: 26)
===

I am running a browser and the CFserver on the same machine for testing.
I'm the only person hitting the CFserver, and like I said, it was 
working before (with more CFML going on on the same page). What could 
I have changed to cause this error?

When it was working before, I was uploading 3 jpegs and a quicktime 
all on the same page and it worked fine; I just figured it would 
be more scalable if I made each one a separate page. Any suggestions?

[EMAIL PROTECTED]











Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cffile action="upload" accetps all file types

2000-12-12 Thread Andrew

Doug:
I'm doing a similar thing with accept = "image/gif,image/pjpeg,image/pjpeg"
instead.  If the user tries to upload a bmp then, and error will be raised
which I can catch... even if it is a bmp simply renamed to a jpeg.


Andrew Hewitt
Web Application Developer
webworld studios, inc.
www.wwstudios.com
"I believe five out of four people have trouble with fractions."

-Original Message-
From: Douglas Jordon [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 12, 2000 3:56 PM
To: CF-Talk
Subject: cffile action="upload" accetps all file types


I've never used the CFFILE upload before, and I'm trying to limit
uploads to gifs and jpegs. My syntax is:

http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cffile action="upload" accetps all file types

2000-12-12 Thread Bruce Heerssen

That is a limitation of the browser. Use server side processing to see if the
file is actually what you want.


> -Original Message-
> From: Douglas Jordon [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 12, 2000 2:56 PM
> To: CF-Talk
> Subject: cffile action="upload" accetps all file types
>
>
> I've never used the CFFILE upload before, and I'm trying to limit
> uploads to gifs and jpegs. My syntax is:
>
>  accept="image/gif, image/jpg, image/jpeg"
>
> etc
>
> but any format is accepted. I can test the content with cfif and
> file.contentsubtype variable, but isn't the cffile tag supposed to do
> this?. Has anyone ever encoutered this?
>
> TIA,
>
> Doug
>
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



cffile action="upload" accetps all file types

2000-12-12 Thread Douglas Jordon

I've never used the CFFILE upload before, and I'm trying to limit
uploads to gifs and jpegs. My syntax is:

http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CFFILE ACTION=UPLOAD probs

2000-10-17 Thread Alex Sherwood

At 11:06 AM 10/17/2000 -0700, you wrote:
>I am using the below code to upload some text files, if the file has an .csv
>extension is will fail the test and get the error, if I just rename the same
>file with no extension it works ok.  I though the accept="text/plain" looks
>at the file contents not the extension.  Any recommendations on how to get
>around this?
>
>Thanks,Adrian
>
>
>
>nameconflict="ERROR" accept="text/plain">
>destination="G:\blah\blah.#currentdate#.#currenttime#">
>
>
>The File Cold NOT Be Uploaded.
>Make Sure The File You Are Uploading Is In A Plain Text Format.
>
>


MIME types are based on file extesions. I wonder what would happen if you 
tried to setup a MIME type with no extension?

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



CFFILE ACTION=UPLOAD probs

2000-10-17 Thread Adrian Cesana

I am using the below code to upload some text files, if the file has an .csv
extension is will fail the test and get the error, if I just rename the same
file with no extension it works ok.  I though the accept="text/plain" looks
at the file contents not the extension.  Any recommendations on how to get
around this?

Thanks,Adrian







The File Cold NOT Be Uploaded.
Make Sure The File You Are Uploading Is In A Plain Text Format.



--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.