Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
$.AjaxFileUpload is not woking in latest version of Chrome Version 83.0.4103.61 (Official Build) (64-bit)

From the latest version of Chrome Version 83.0.4103.61 (Official Build) (64-bit) Jquery $.AjaxFileUpload is not working, Please help me if anyone has idea, This AJAX call is working fine in Older version of chrome and other browsers like firefox etc.. Only issue with the latest version of chrome Here is the Code:

JSP Code is like

<input type="file" id="fileform-a04d99a8-3cc0-49af-868d-48bdfd26f448" name="files" class="add-attachment-input" style="position: absolute; top: -100000px;" multiple="" >

Javascript:

 $("#fileform-" + code).AjaxFileUpload({
    action: "/claims/post/attachment/",
    onSubmit: function(element, filename) {
            return {jobcode: code};
    },
    onComplete: function(filename, response) {
        mci.claims.handleAttachmentResponse(code, $thisitem, filename, response);
    }
 });

JavaCode:

@RequestMapping(value = "/post/attachment/", method = RequestMethod.POST, produces = "text/html")
@ResponseBody
public String addAttachments(@RequestParam("files")
final List<MultipartFile> files, @RequestParam("jobcode") String jobcode)
{
    jobcode = XSSFilterUtil.filter(jobcode);

    final Map<String, String> result = new HashMap<>();
    for (final MultipartFile file : files)
    {
        result.put(file.getOriginalFilename(), claimsFacade.addAttachmentToClaim(file, jobcode));
    }
    return jsonFacade.mapToJsonString(result);
}
over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

FYI jquery upload was broken by the 19-02-2020 Chrome browser update 83.0.4103.61. https://bugs.chromium.org/p/chromium/issues/detail?id=1084874 Fixed in release from 03-06-2020 (83.0.4103.97)... phew.

over 4 years ago · Santiago Trujillo Report

0

There is another jQuery plugin that relied on creating an iframe with src="javascript:false" and it seems like chrome 83 doesn't like it anymore (https://github.com/jquery-form/form/issues/571). It looks like (as per the jsFiddle posted there) chrome 83 block the call when using that src attribute value (I have verified it myself with Chrome 83.0.4103.61-1) but dones't block it if the src attribute value is about:blank.

As per the source for the plugin you are using, it creates an iframe with the aforementioned src attribute value (https://github.com/davgothic/AjaxFileUpload/blob/master/jquery.ajaxfileupload.js#L99), and thus the issue. Changing that line into this should solve the issue:

.append('<iframe src="about:blank" name="' + id + '" id="' + id + '" style="display: none;"></iframe>');

Although the plugin hasn't changed much in the last few years (last commit was about 2 years ago), you can do a Pull Request with this change.

over 4 years ago · Santiago Trujillo Report

0

Changed src="about:blank" to src="javascript:false;"

Changed src="about:blank" to src="javascript:false;" in jquery.ajaxfileupload.js, solved my issue

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!