• Resolved slr1979

    (@slr1979)


    Hi,

    I am looking for a way to bypass the CDN so that the urls in upload fields on the frontend of my sites are not rewritten.

    I am using Easy Digital Downloads Frontend Submissions for my marketplace style site. When the LS CDN is active, the urls in the upload field are rewritten which causes the EDD FES field validation to fail as it does not recognise the url as the local WordPress uploads directory,

    Obviously, I could set LS CDN to not serve files from the CDN if they are in the WordPress upload folder but that would mean all files contained in that folder would be served from the WordPress uploads folder which is not desirable as I also have files etc that should be served via CDN.

    I would appreciate any help you can provide in order to work around this problem.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi @slr1979, is there any identifier on the upload we can use? For example, class name, attribute…

    Thread Starter slr1979

    (@slr1979)

    Hi @stanleylitespeed, many thanks for replying.

    One of the input fields, as an example, has the ‘class=”fes-file-value”‘ and ‘data-fieldname=”fes_cover_image”‘ if that helps. You choose the files via the standard WP media uploader so I’m not sure if that complicates things as the url is already rewritten in there?

    Just so you know aswell, I am using a self-hosted CDN on a subdomain i.e cdn.mydomain.com

    Hi @slr1979, may I know the original code of the input fields? Usually, our plugin just replacing the path of images, JS and CSS. We need the code to check why the path get replaced.

    Thread Starter slr1979

    (@slr1979)

    Hi @stanleylitespeed,

    I think we may be misunderstanding each other here.

    I have my images, js and css set to serve via the cdn.

    EDD FES has the ability to select files for the input from the standard WP media uploader in the frontend of the site. Obviously, as I am serving my images from the CDN when I upload a file from the media uploader the link is already rewritten for the CDN when really it should really stay as the local url i.e https://www.domain.com/wp-content/uploads/file.jpg.

    In EDD FES, the input has validation code that can tell if the file is locally hosted. It fails because it thinks the file is not locally hosted as the url is for the CDN (function edd_is_local_file) and also it cannot set or find the attachment id in it’s specific function.

    What I am hoping to do is prevent LS CDN rewriting links to any filetype in the media uploader in the frontend when EDD FES is active. I don’t suppose there is a way to do this via a filter or function i.e if FES is active do not rewrite urls in the media uploader?

    Do let me know what you think. I hope you help me find a solution to this issue.

    Many thanks again

    Thanks for the explanation, may I know which EDD and FES plugin are you using and can you show us the details step for how to reproduce the error?

    You also can join our Slack channel or submit a ticket here for showing us your page for demonstration.

    Thread Starter slr1979

    (@slr1979)

    Many thanks @stanleylitespeed. I have submitted a ticket – #398213 and look forward to a resolution for this issue asap.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Bypass CDN for upload fields on frontend?’ is closed to new replies.