I am downloading an asset bundle using the following code:
<?php
$file_url = "AssetBundle/bundle-numb";
header("Content-Type: application/zip");
header("Content-Disposition: attachment; filename=".basename($file_url));
readfile($file_url);
>?
However, only some bytes get downloaded and when I open the file I get an error saying
filesize(): stat failed for ....
When I try the same code for downloading other files it works fine, but not with asset bundles.
Asset bundles are LZMA compressed by default and I think the asset bundles do not have any file extentions.
Downloading works fine when I use the following directly in the browser:
http:XXXXXXXXXX.com/AssetBundle/bundle-numb