Post by oliversuc » Mon Jun 01, 2020 2:22 am

For all still using Opencart 1.5 after Chrome 83 Update, image and document upload is fixed by adding:

Code: Select all

iframe.setAttribute('srcdoc', this._settings.action);
in \admin\view\javascript\jquery\ajaxupload.js

Code: Select all

var iframe = toElement('<iframe src="javascript:false;" name="' + id + '" />');
            // src="javascript:false; was added
            // because it possibly removes ie6 prompt 
            // "This page contains both secure and nonsecure items"
            // Anyway, it doesn't do any harm.
            iframe.setAttribute('id', id);
            iframe.setAttribute('srcdoc', this._settings.action);
            iframe.style.display = 'none';
            document.body.appendChild(iframe);

Newbie

Posts

Joined
Mon Nov 12, 2012 9:17 pm

Post by ADD Creative » Tue Jun 02, 2020 1:32 am

Useful post, thanks.

It seems it can also be fixed by changing.

Code: Select all

var iframe = toElement('<iframe src="javascript:false;" name="' + id + '" />');
To.

Code: Select all

var iframe = toElement('<iframe src="about:blank" name="' + id + '" />');
Which may be a more standard way of creating a empty iframe.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by ADD Creative » Tue Jun 09, 2020 3:22 am

catalog/view/javascript/jquery/ajaxupload.js also needs updating.
https://github.com/opencart-ce/opencart ... c71c02?w=1

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 34 guests