Issue metadata
Sign in to add a comment
|
File Upload not working in Chrome
Reported by
durgarat...@gmail.com,
Oct 14 2016
|
||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 Steps to reproduce the problem: 1. Open https://cbftp.cbre.com/Upload 2. Try to provide all valid inputs (including a valid cbre email). Please make sure to upload a non empty file in the File Upload section 3. Click on Upload button What is the expected behavior? The file should get uploaded successfully without showing any error message. What went wrong? I am using the "HttpRequestBase" class's method to access the file to be uploaded in my MVC application. The code block I am using in View is <input type="file" name="myFile" id="myFile"> And jQuery section is var myFile = document.getElementById('myFile'); if (myFile.files.length > 0) { mydata.append("uploadedfile", myFile.files[0]); } And the controller block is var content = Request.Files["uploadedfile"]; if (fileContent == null || fileContent.ContentLength <= 0) { //Display Error } else { //Process file } Finally when I am trying to run the application, I am getting the "Error" block getting executed. This happens only for Chrome v 53.0.2785.116 m. We have not faced this issue with earlier version of Chrome, and also not getting this issue with any other browser. Did this work before? No Does this work in other browsers? N/A Chrome version: 53.0.2785.116 m Channel: n/a OS Version: Windows 7 Professional, Version 6.1, build 7601: Service Pack 1 Flash Version: Shockwave Flash 23.0 r0 This file upload feature is working in all other versions of IE, and Chrome as well. However this is a very specific issue (a combination of browser version, and Windows OS version, I believe). In this specific combination, the file is reading as empty and showing error message.
,
Oct 17 2016
Same behavior in Windows M53 On your server, can you verify Request.ContentLength and Request.Files.AllKeys ?
,
Oct 20 2016
,
Oct 20 2016
Hi, Thanks a lot for looking into this. Please use DurgaPrasad.Rath@cbre.com as a valid @cbre email address. And the code snippet is the same as it is in the code, just the variable names are changed. I will be checking on the other details on the server, and will let you know. Thanks, Durga
,
Oct 28 2016
Thank you for providing more feedback. Adding requester "jsbell@chromium.org" for another review and adding "Needs-Review" label for tracking. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 28 2016
durgarath.nist@gmail.com - were you able to inspect the server behavior to determine what data is being received?
,
Oct 31 2016
I was unable to reproduce locally using a custom ASP.NET solution; both client and server are Windows 7 SP1 (64 bit), using Chrome 54 and MSVS Community 2015. Similarly, using the email address you provided I was able to upload a file successfully (at least, the server did not give errors) from Windows 7 / Chrome 54. Are you able to provide any more details? Do you still repro in Chrome 54?
,
Nov 7 2016
Well leave this bug open for another week while awaiting response to jsbell's question in #c7.
,
Nov 22 2016
No repro and no further feedback - resolving for now.
,
Jun 15 2018
,
Jun 15 2018
|
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by jsb...@chromium.org
, Oct 17 2016Testing in M54 on Linux, I'm unable to repro, but obviously I'm not able to see what your server sees and I don't have a valid @cbre email address. 1. I put a breakpoint on the `if (!isValid) {` line 2. I put a breakpoint on the `if (confirmationModel.errorMessage != null)` line 3. Fill in the form with name: "a", email: "a@example.com", select a 30k file, and put in anything for the CAPTCHA 4. Click Upload 5. When the breakpoint hits on the isValid line, set isValid to true and let it proceed 6. When the breakpoint hits the errorMessage line, look at the Network tab On the network tab I see the POST to UploadFile, and the Content-Length is what I expect (around 30k). So far as I can tell the file content is uploading correctly. (Your code snippet doesn't match the page, uploadedfile vs. file, and content vs. fileContent; I assume that's just the examples and the real code matches.) I'll see if I can repro on Windows.