• When our customers try and download a PDF file from the website after making a purchase on woocommerce plugin (via downloadable hyperlink), that is over a certain size in MB, it is not fully downloading and is showing as download ‘failed.
    Other small PDF’s are downloading OK, is there anything we can do?

    Thanks,
    Ricky

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @ricky – It seems to be some kind of server limitation as the problem is causing only with PDF files with large size.

    If you go to WooCommerce > Settings > Downloadable Products, you have three choices under File Download Method:

    1. Redirect only – When users download a file, their link redirects to the file.
    2. Force download – File downloads are forced, using PHP.
    3. X-Accel-Redirect/X-Sendfile – Downloads are handled by the server (nginx/apache). This method requires the X-Accel-Redirect/X-Sendfile module be installed and enabled on the server. Confirm with your web host that one of these modules is installed before using this method for your store.

    To ensure files are protected from direct linking, Force Download can be used. Files will be served by PHP. However, if your files are large, or the server is underpowered, you may experience timeouts during download. In this case, you need to either look at your server or use the redirect method.

    If your server supports it, use X-Accel-Redirect/X-Sendfile; it’s the most reliable method because the file is served directly to the customer, and gives you the best performance. Files are also protected by an .htaccess file, making it secure.

    • This reply was modified 7 years, 5 months ago by Prasad Nevase. Reason: improved formatting
    Thread Starter rickywordpress

    (@rickywordpress)

    hi, I have asked our host provider, they have said:

    You need to let them know you are using a Windows Server 2012 R2 IIS 8 web server so methods such as ‘X-Accel-Redirect/X-Sendfile’ which are for nginx/apache will not work.

    Ricky

    Yes, as I mentioned in point #3 – that option is for nginx/apache server. Probably you need to increase the Maximum Execution Time on your server. Please get in touch with your host provider for the same.

    Also, (I think I shall have mentioned it before) please check this thread which explains about the details you need to share to get faster assistance on your problem/query.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘woocommerce file download ‘failed for PDF over certain size’ is closed to new replies.