Why we need to modify Google Drive links to avoid CORS errors ?
-
Hi guys,
We have been facing issues with our forms and downloads recently.
We use a combination of Download Monitor (+ xtensions) and Gravity Forms mainly.On that page https://www.apogea.fr/nos-logiciels/sage-x3/ we had a CORS standard error.
Access to XMLHttpRequest at 'https://drive.google.com/uc?export=download&id=x_googledrive_doc_id_2_x' from origin 'https://www.apogea.fr' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
By tracing the link of that doc we realized that by modifying the URL of the file in question on the download file post (Download monitor): .
../wp-admin/post .php?post=xxxx&action=edit
from https://drive.google.com/file/d/x_googledrive_doc_id_1_x/view?usp=sharing
to https://drive.google.com/uc?export=download&x_googledrive_doc_id_2_x
well it works without error.
I just modified and tested that specific page again and it worked
The download is attached to the second button at the top of the page “Télécharger la fiche produit”Or “Télécharger le comparatif” for that page https://www.apogea.fr/votre-besoin/logiciels-de-comptabilite/ which hasn’t yet been modified and therefore still doesn’t work properly.
Which for us is quite surprising and annoying as well.
What has changed ? Why to modify all our links from Drive would be needed ?And is what we analyzed accurate ? Or it’s only a wrong track masking the real issue ?
And what would be that real issue then ?Global system information
- PHP 7.3.33
- WordPress 6.1
- Gravity Forms 2.6.7
- Download monitor 4.7.3
- Download Monitor – Google Drive 4.0.5
- Download Monitor – Gravity Forms Extension 4.1.4
- Elementor Pro (modales/popup) 3.8.0
- Elementor 3.8.0
- WP Rocket 3.12.2.1
Thanks a lot.
Hopefully you might help.
Best regards.The page I need help with: [log in to see the link]
- The topic ‘Why we need to modify Google Drive links to avoid CORS errors ?’ is closed to new replies.