Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
staticthis #1
File uploads without saving file
I am running a system that takes a users file and uploads it to a blob. That
worked flawlessly in Coldfusion 6.1 and 7. Now, I need to get the mime type.
Thats not so easy. The only answers Ive found so far is to save a temp file,
cffile it and get it that way, but there must be a cleaner way. So I went back
to my java way of doing things, and tried to bring it in.
Here is what Im doing
I get the file
<CFFILE ACTION="ReadBinary"
FILE="#thefile#"
VARIABLE="aBinaryObj">
create an object
<CFOBJECT type="java" name="parser"
class="com.oreilly.servlet.multipart.MultipartPars er" action="create">
everything is working good until
<CFSET thenum=10485760>
<CFSET parse = parser.init(GetPageContext().getRequest(),thenum) >
I get
Object Instantiation Exception.
An exception occurred when instantiating a java object. The cause of this
exception was that: .
I have been at this all day, with no luck. If I put in 10*1024*1024, it will
fail because cf will convert it to a double, while MultipartParser wants an
int. If I try and create a CFX tag to do, the CFX extention request is not
compatiable with the MultipartParser. Anyone got any ideas? Im running low...
staticthis Guest
-
Web File uploads
While trying to do a simple file upload via a web form, (enctype="multipart/form-data"), I've run into a problem that has me stymied. This is an... -
Specify temp directory and file name for file uploads?
I'm interested in understanding how MX processes file uploads. 1) By default, uploaded files seem to be placed in the... -
File Uploads
Hello You must use <form action="uploadItem.php" method="post" enctype="multipart/form-data"> gerwazy POLAND -
PHP and file uploads
Hi All, Here's one thing that I don't know much about - file uploading. As part of my project, I will have to build a file manager of sorts -... -
#24919 [NEW]: PHP File Uploads in RAM
From: jgiglio at smythco dot com Operating system: Linux PHP version: Irrelevant PHP Bug Type: Feature/Change Request Bug... -
Dross.2 #2
Re: File uploads without saving file
look into the javacast() function... if worse comes to worst you can write your
own java class that can be called from CF.... no need to use the CFX interface.
Drop the cfobject tag though... just personal opinion but it's ugly. I like
the <cfset parser =
createObject('java','com.oreilly.servlet.multipart .MultipartParser').init()/>
syntax much better.
Dross.2 Guest



Reply With Quote

