Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Add-on download links
Am I the only one who uses wget to download Vanilla add-ons? I'd love to see a redirect and/or mod_rewrite beeing used instead of content-disposition for extension downloads. wget (at least my version) ignores content-disposition. I just wanted to explain how I do it.
- Find an extension I want and copy the link from my browser
- Replace the action Download with DoDownload, so we get the real file (otherwise, I guess each downloaded extension results in 2 real download stats?)
- Download with wget --server-response to figure out the filename
- Rename the downloaded index.php?PostBackAction=DoDownload&AddOnID=000 file to xxx found in 3
0
This discussion has been closed.
Comments
Here is the function I use to get and deliver the file with PHP. If you know of a better way, please share:
function SaveAsDialogue($FolderPath, $FileName, $DeleteFile = '0') { $DeleteFile = ForceBool($DeleteFile, 0); if ($FolderPath != '') { if (substr($FolderPath,strlen($FolderPath)-1) != '/') $FolderPath = $FolderPath.'/'; } $FolderPath = $FolderPath.$FileName; header('Pragma: public'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Content-Type: application/force-download'); header('Content-Type: application/octet-stream'); header('Content-Type: application/download'); header('Content-Disposition: attachment; filename='.$FileName); header('Content-Transfer-Encoding: binary'); readfile($FolderPath); if ($DeleteFile) unlink($FolderPath); die(); }
And later take care of it with mod_rewrite. I like the first best since then I would get the real filename downloaded. The latter would mean that I'd get latest.extension as the filename. But it's always nice with easy URIs. So maybe one could do a mix.