Downloadable Products: File name reverting to (part of) file path
-
I’m having an issue with digital downloads (zipped PDFs) hosted on a third-party cloud service. I’ve tested and confirmed this on both Box.com and Mega.co.nz, and suspect it would be the case with other cloud services, as well.
My downloaded file names are showing up upon download as the portion of the file path after the domain name—e.g. “twiqsh61mtapihb2ekxz8xc0lqe1qgbv” or “#!nJlyVSyC”—instead of the actual file name, even though I’ve specified the exact file name both in the WooCommerce product settings and in the cloud service (when possible). The file names are displaying correctly on the WooCommerce download page and confirmation e-mails; it’s only in the modal download window and the actual downloaded files that the file names that are getting systematically corrupted.
Furthermore, when the files download, they do so without the .zip extension. When I try to open them directly by double-clicking, they try to open unsuccessfully in my browser (?!), with the error messages “An error occurred while loading Preview. Please try again later” and “Reload Page.” When I add the .zip extension and try to unzip the files, they unzip as “twiqsh61mtapihb2ekxz8xc0lqe1qgbv.zip.cpgz” and then twiqsh61mtapihb2ekxz8xc0lqe1qgbv 2.zip” if I double-click on that, and so on (endless loop).
Finally, the downloaded files are not full size; they’re typically only a few K, leaving me to believe that they’re actually a portion of the download page. However, adding .html or .php to the filename doesn’t give a valid HTML or PHP document.
I suspect this may be a compatibility issue between the cloud service and the File Download Type in Settings > Products > Downloadable Products. It occurs with both Force Downloads and X-Accel-Redirect/X-Sendfile (not Redirect). However, you’d think that modern cloud services should be able to handle PHP forced downloads.
I’ve put in a ticket to Box.com, but so far, no luck. Has anyone seen this before, or know how to resolve it?
- The topic ‘Downloadable Products: File name reverting to (part of) file path’ is closed to new replies.