coldfusion - Strange Form problem: cffile not working -


Hmmm ... strange problems ...

I am creating a form of course uploading Actually, one searches for a course and selects the button next to the course, which says "upload silebi". After this, a window will prompt them for the file. I passed the information on this page to enter the URL in the database etc.

  & Lt; Input name = "upload" type = "button" value = "upload course" id = "upload" onclick = "window.open ('upload_syllabi.cfm course = # syllabus # & semester = # semester # & amp; Referee = # refnum # ',' popup ',' width = 350, height = 170, scrollbar = no, resizable = no, toolbar = no, directory = no, location = no, menubar = no, not position = no , Left = 0, top = 0 ') "/>  

It is on this page:

  & lt; Cfset session.semester = # url.semest # & gt; & Lt; Cfset session.course = # url.course # & gt; & Lt; Cfset session.ref = # url.ref # & gt; & Lt; Name of the form = "upload form" enactepe = "multipart / form-data" action = "upload_action.cfm" & gt; & Lt; Align table = "center" class = "content with" & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; H3 & gt; Uploaded Course & lt; Cfoutput & gt; & Lt; P & gt; # Session.semester # # session.course ## session.ref # & lt; / P & gt; & Lt; / Cfoutput & gt; & Lt; / H3 & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td align = "center" & gt; & Lt; Input name = "syllabiUpload" id = "uploader" type = "file" /> & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td align = "center" & gt; & Lt; Input type = "submit" name = "uploaded" id = "uploaded" value = "upload" / & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Nbsp; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD align = "center" & gt; & Lt; A href = "javascript: window.close ();" & Gt; [Close] & lt; / A & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / Form & gt;  

I did not have a session variable originally ... but I had some problems with url.semest ... and I ended up leaving them there.

Anyway ... When the form is submitted it should go to this page: upload_action.cfm

  & lt; Cffile action = "upload" filefield = "syllabiUpload" destination = "# silebelok #" name-icon = "computer" & gt; & Lt; Cfset SyllabiURL = "# SyllabiPath ## cffile.serverfile #" & gt; & Lt; Cfquery name = "checkSyllabi" data source = "#susds #" username = "# pouch #" password = "# bag #" & gt; Choose from * faculty.dbo.Syllabi where faculty.dbo.syllabi.Semester = '# session.semester #' and faculty.dbo.syllabi.Refnum = '# session.ref #' & lt; / Cfquery & gt; & Lt; Cfif getSyllabi.recordCount is 0 & gt; & Lt; Cfelse & gt; & Lt; Cffile action = "delete" file = "#csssebi.valell #" & gt; & Lt; / Cfif> & Lt; Cfquery name = "updateSyllabi" data source = "# thalis #" username = "# pouch #" password = "# pouch #" & gt; Update faculty.dbo.Syllabi set URL = '# SyllabiURL #' where semester = '# session.semester #' and Refnum = '# session.ref #' & lt; / Cfquery & gt; & Lt; Table align = "center" & gt; & Lt; TR & gt; & Lt; TD & gt; & Nbsp; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; Uploaded & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Nbsp; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt;  

When I click on submit button, I receive this error:

Invalid Content Type: ''. Cfile action = "upload" requires form to use encrypt = "multipart / form-data".

Strange kind of reason ... I definitely have that line of code in my code

Hm ....

Edit: Issue # 2 Continue.

Obtaining this error:

In the Marine Studio Syllabus2.rtf action from file D: \ ColdFusion8 \ runtime \ server \ coldfusion \ Server-INF \ Temp \ wwwroot-tmp \ Delete specified does not exist.

Did I make a mistake? : \ Not sure that ..

may be a browser issue or you have an anti-virus The problem with proxy or firewall upload is that as you say, you are asking the browser to use the correct encoding so that it is likely lost in translation.

Option 2 Are you looking at cached pages and not viewing the version with the correct version? Try clearing your browser cache.

Edit: The problem is really simple, you have not told it to use form = "post" on the form.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -