• Hello Shafayat! I’m using Google Drive add-on and recently I receive the following error from Google Drive: “Bad Request Error 400”. I did not change any configuration.

    Hope you can help me, thanks!

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter argburs14

    (@argburs14)

    Hi Shafayat! Can you help me with this? I don’t know if it is a plugin issue or Google Drive…
    Thanks!

    I am also experiencing the same issue. I am able to access the google drive and select the file and connect to WPDM

    When I try to test the download it returns

    Bad Request
    Error 400

    Any help or guidance would be appreciated
    TIA

    Same here, I think a recent update broke it? The URL is malformed, the GUID for the file is ok

    Rightyo, here’s how to fix it …

    wp-content/plugins/wpdm-google-drive/src/picker.php – line 92, I left the old version commented out

    //var downloadurl = 'https://docs.google.com/uc?authuser=0&id='+id+'&export=download';
    var downloadurl = 'https://drive.google.com/open?id='+id;

    After you change this you neeed to re-edit the download to re-establish the corrected link.

    • This reply was modified 5 years, 9 months ago by cadbloke. Reason: I fixed it
    • This reply was modified 5 years, 9 months ago by cadbloke. Reason: left a vital bit out. Sorry
    Thread Starter argburs14

    (@argburs14)

    Thanks @cadbloke
    What do you mean with “re-edit”? Edit something and save changes in the download post?

    Thread Starter argburs14

    (@argburs14)

    @cadbloke I tried you solution and worked, but it shares the download link (not direct download). I don’t want to share the link because I need my suscribers to visit my web. I hope Shafayat can help us or maybe have to wait for the next update.
    Thanks!

    @argburs14

    Control-J in your browser will show them the link the download is coming from. You can’t really hide the link unless it is always a temporary generated link but even then with Fiddler you can see where the file comes from. Google drive generated a temporary 333 character URL when it does my download – that is what this plugin really needs to return.

    By the way, my edit does not break any obfuscation – there was none to start with.

    “Re-edit” means you need to re-link the file in the post and save it again so the link is regenerated.

    Many thanks to @cadbloke for the fix!

    It worked fine for me. Perhaps it will be addressed in the next update.

    I see that you also enjoy sailing.

    May time and tide be with you…..

    Plugin Contributor Shafaet Alam

    (@shafayat-alam)

    We have fixed the issue; an update is coming on 1st July 2019.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Bad Request Error 400’ is closed to new replies.