• Resolved Tyler Tork

    (@tylertork)


    This mostly works, but occasionally I get users telling me they tried multiple times and were unable to upload images. These are nontechnical end users so they mostly don’t understand that they need to note down any error messages, but one person has told me they get the message “upload session has expired.”

    Have you tested this on shared hosted servers and with slower connections to make sure you’re accounting for the extra time required to upload large files under those conditions? Can we have a setting to adjust whatever timeout is happening here in cases where users are experiencing this error?

    Above all, CAN WE PLEASE HAVE A BETTER ERROR MESSAGE that end users are able to make some sense of?

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Rustam Sibagatov

    (@bruklig)

    Hello, Tyler!
    @tylertork

    Thank you for your message and your feedback.

    I tried to simulate the situation you described. And the only case when I get this error “The upload session has expired. Please refresh the page and try again.” is when the internet connection is getting interrupted (or completely disconnected) or the page gets accidentally refreshed and then immediately stopped. I’m pretty confident that in your case it’s the connectivity issues (or bad signal, if it’s mobile internet).

    Also, it has nothing to do with shared hosting, because I’ve tested it on a shared hosting, and even throttled my bandwidth down to GPRS standard (50Kpbs down, 20Kbps up), and still was able to upload and send heavy .bmp files ranging in size from 26 MB to 40 MB. Because the compression is happening all the way on the user’s side, it only uploads the compressed files to the server, which ends up no more than 300-400 KB per file in most cases.

    The error message appears clear black on white and in a red frame. So you can’t miss it. The session is 30 minutes long by default. We can add the session duration parameter to the setting page in the admin panel, so you can manually increase the session from 30 minutes to more. But the session has to expire for security reasons.

    Please, advise on how would you like to proceed with your issue, and we’ll try our best to help you.

    Also, would you like to participate in testing the new feature of the plugin? It’s the support of iPhone file formats HEIC and HEIF. But your server should have to support this technology. You can check it in your WordPress admin panel: Tools > Site Health > Info (tab) > Media Handling > ImageMagick supported file formats. And see if you can find HEIC and HEIF in the list.

    Thank you!

    Best regards,
    Rustam.

    Thread Starter Tyler Tork

    (@tylertork)

    I now have a file I can use to reproduce the error, and a console log showing the error message, which involves the condition “strict-origin-when-cross-origin” in Firefox browser. The error occurs instantly — not after 30 minutes.

    I will gladly supply the log file and sample image (though I suspect the image content has nothing to do with it, and the failure is all about the communication protocol). How would I get you this information?

    Thread Starter Tyler Tork

    (@tylertork)

    You can observe the error yourself using the form at https://freelittleartgalleries.art/add

    JQMIGRATE: Migrate is installed, version 3.4.1 jquery-migrate.min.js:2:981
    XHRPOST
    https://freelittleartgalleries.art/wp-admin/admin-ajax.php
    [HTTP/3 403 1462ms]


    POST
    https://freelittleartgalleries.art/wp-admin/admin-ajax.php
    Status
    403
    VersionHTTP/3
    Transferred884 B (101 B size)
    Referrer Policystrict-origin-when-cross-origin
    DNS ResolutionSystem

    Plugin Author Damir Akhmedshin

    (@yesworld)

    Hey @tylertork,

    I can upload a version where I’ve refactored the form and removed the AJAX photo upload. It’s a raw version, so you can test it yourself. Unfortunately, I don’t have time to test it myself. 🙁

    If everything’s okay, I’ll upload it to the WP. Can you test it?

    P.s. strict-origin-when-cross-origin has nothing to do with it.

    Thread Starter Tyler Tork

    (@tylertork)

    I would love to test the new version as this is a serious problem for me. I’m not sure what “upload it to the WP” means, but if you tell me where to find it, I’ll grab it.

    Plugin Author Damir Akhmedshin

    (@yesworld)

    You can find the new Beta version here: https://github.com/yesworld/plugin-wp-optimize-image/tree/release/2.4.0-beta.1

    If there’s a chance to test HEIC photos, I’d be happy to. 😉


    Thread Starter Tyler Tork

    (@tylertork)

    Updated version seems to be working well, no more reports of this problem from form submitters.

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.