Hello Everybody,

I am working on a application to upload
attachments/files to the server using cffile.

The interface is designed to allow the user to select
one or more files to attach through a pop-up window. I
am passing the list of files along with the complete
file path the user has selected back to the parent
window. To explain this further, the pop-up window has
a form with the input type 'file' formfield and hidden
variable that stores a comma separted list of all the
file paths the user wishes to upload.

On the parent window, I'm looping through this list
and trying to upload the files one by one. I get an
error.

Here is the code:

<cfset MimeTypes =
"text/html,application/vnd.ms-powerpoint,application/vnd.ms-project,application/pdf,application/msword,application/vnd.ms-excel,application/x-zip-compressed,image/jpeg,image/gif,application/x-visio,application/drafting,model/vnd.dwf,image/x-dwg,application/dxf,application/x-excel,application/rtf,text/plain">

<cfloop list="lFilesToUpload" index="fUpload">

<cffile
action=""> filefield="#fUpload#"
destination="#request.BlobDir#"
nameconflict="MAKEUNIQUE"
accept="#MimeTypes#">

</cfloop>

This is the error I get.

Invalid content type:
"application/x-www-form-urlencoded".

I don't have that mime type in my code

I think the error is caused because the "filefield"
cffile attribute expects a form input variable? Can I
not pass this attribute any variable name or in this
case list item name?

Can someone please show me how to get round this
problem

Best Regards,
cfcoder



__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to