File upload Error 2038

classic Classic list List threaded Threaded
7 messages Options
jfb
Reply | Threaded
Open this post in threaded view
|

File upload Error 2038

jfb
Hi All,
Our File upload process using HTTPS shows this error:
Error #2038: File I/O Error. URL:
https://DomainName/AppFolder/upload/upload.cfm?CFID=1492345&CFTOKEN=26356460&jsessionid=2630db6742e948fb9ca92c7e372d51496454 

Upload.cfc file
--------------
<cfset base_file = GetCurrentTemplatePath()>
<cfset base_path = GetDirectoryFromPath(base_file)>
<cfset images_dir = "#base_path#images">

<cfset setEncoding("url","utf-8")>
<cfset setEncoding("form","utf-8")>

<cfif IsDefined("Form.fileData") and IsDefined("Form.fileName")>
 
 
  <cfset src = GetHttpRequestData()>
  <cfoutput>#Form.fileName# #Form.fileData#</cfoutput>
  <cfif CompareNoCase(CGI.server_name, src.headers.Host) neq 0>
    <cfabort>
  </cfif>
 
 
  <cfif not DirectoryExists(application.upload_folder)>
    <cfdirectory action="create" directory="#application.upload_folder#" />
  </cfif>
 
  <cffile action="upload"
      fileField="Filedata"
      nameconflict="overwrite"
      destination="#application.upload_folder#"
      mode="666"
      result="ret">
</cfif>

CrossDomain.xml file on the wwwroot folder
-----------------------------------------
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM
&quot;http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd&quot;>

<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>

</cross-domain-policy>

The file upload is working from my developer box using the same
configuration but using IIS self certificate on port 443.
What am I missing?
How can I debug this issue?
Thanks,

JFB




--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
jfb
Reply | Threaded
Open this post in threaded view
|

Re: File upload Error 2038

jfb
Hi,
I found this in this thread https://forums.adobe.com/thread/118339:
"Through Flash's FileReference and FileReferenceList classes, you can create
a powerful file uploader that allows the user to upload multiple files with
a single form element. But beware: unless the user happens to be using IE,
the upload will use a new browser session to upload the files. This means
that if you require that a user be authenticated before uploading something
(and you better be), the upload won't work - the request will be forwarded
to the login form, or to wherever your system forwards unauthorized
requests. This is a maddening bug to track down, and there is nothing you
can do to make Flash use the right session. The work around is to send the
session cookie in the url and, on the server side, use that to override the
new (and wrong) session cookie sent by Flash "

I am adding a session after the name of my file in the url but still getting
the error.
How can I find or overwrite the session cookie sent by flash?
Thanks






--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: File upload Error 2038

OmPrakash Muppirala
On Tue, Sep 26, 2017 at 8:54 AM, jfb <[hidden email]> wrote:

> Hi,
> I found this in this thread https://forums.adobe.com/thread/118339:
> "Through Flash's FileReference and FileReferenceList classes, you can
> create
> a powerful file uploader that allows the user to upload multiple files with
> a single form element. But beware: unless the user happens to be using IE,
> the upload will use a new browser session to upload the files. This means
> that if you require that a user be authenticated before uploading something
> (and you better be), the upload won't work - the request will be forwarded
> to the login form, or to wherever your system forwards unauthorized
> requests. This is a maddening bug to track down, and there is nothing you
> can do to make Flash use the right session. The work around is to send the
> session cookie in the url and, on the server side, use that to override the
> new (and wrong) session cookie sent by Flash "
>
> I am adding a session after the name of my file in the url but still
> getting
> the error.
> How can I find or overwrite the session cookie sent by flash?
> Thanks
>

Adding the session after the name of the file will not automatically work.
In your upload API, you need to handle this specially.

Hope that helps.

Thanks,
Om


>
>
>
>
>
>
> --
> Sent from: http://apache-flex-users.2333346.n4.nabble.com/
>
jfb
Reply | Threaded
Open this post in threaded view
|

Re: File upload Error 2038

jfb
In reply to this post by jfb
I found this:
https://forums.adobe.com/thread/1093769

I am using HTTPS but still breaking sometimes in IE. In Firefox doesn't work
at all, even after install the cert.
Anyone have any ideas?




--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

RE: [Non-DoD Source] Re: File upload Error 2038

Kessler CTR Mark J
The uploading works pretty well for us for everything but Firefox.  The only hitch we get from anything else is usually the web server (IIS) will reset a file upload if the file is larger than a certain size and will expect to be uploaded slightly differently.

For firefox based ones you can use a FileReference to have the user browse for the file to upload.  Instead of having the filereference do the upload directly, you process it into a standard connection with the data.  Meaning you setup your own header in something like a URLRequest / URLLoader.  Its manually adding files to the sent data using the FileReference.data(bytearray).  It's a little fiddly to figure out what HTTP Boundaries are at first and how to use them, but overall they are  just like long ugly delimiters.

Let me know what parts you need to be more specifics about


-Mark K


-----Original Message-----
From: jfb [mailto:[hidden email]]
Sent: Tuesday, September 26, 2017 2:30 PM
To: [hidden email]
Subject: [Non-DoD Source] Re: File upload Error 2038

I found this:
https://forums.adobe.com/thread/1093769

I am using HTTPS but still breaking sometimes in IE. In Firefox doesn't work
at all, even after install the cert.
Anyone have any ideas?




--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/

jfb
Reply | Threaded
Open this post in threaded view
|

RE: [Non-DoD Source] Re: File upload Error 2038

jfb
Thanks for your reply and help Kessler,
Our files are small, so size is not an issue. We don't care Firefox because
the customer use only IE.
The issue still random in IE but once you get the error, you can not pass,
it will keep crashing.
How are you doing this process? Do you have an example?
Remember that I am using IIS with HTTPS (443).
Best.




--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
jfb
Reply | Threaded
Open this post in threaded view
|

RE: [Non-DoD Source] Re: File upload Error 2038

jfb
Hi all,
I found this:
http://help.axletreemedia.com/templates/System/details.asp?id=31606&PG=resources&CID=34053
Do I need to ask to every user to uninstall and reinstall flash?
Any ideas, comments?
Thanks



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/