.7z files?

I need to be able to upload 7z files to my cart for the use of phone devices using Android. Is “.7z” not a valid format? I receive the error:

Error: File could not be uploaded

Any help on this?

In /core/fn.fs.php you can add file types for downloadable products, in this code:

function fn_get_file_type($filename, $not_available_result = 'application/octet-stream')
$file_type = $not_available_result;
static $types = array (
'zip' => 'application/zip',
'tgz' => 'application/tgz',
'rar' => 'application/rar',
'exe' => 'application/exe',
'com' => 'application/com',
'bat' => 'application/bat',
'png' => 'image/png',
'jpg' => 'image/jpeg',
'jpeg' => 'jpeg',
'gif' => 'image/gif',
'bmp' => 'image/bmp',
'swf' => 'application/x-shockwave-flash',
'csv' => 'text/csv',
'txt' => 'text/plain',
'doc' => 'application/msword',
'xls' => 'application/vnd.ms-excel',
'ppt' => 'application/vnd.ms-powerpoint',
'pdf' => 'application/pdf'

Simply add them in the same format, for example, .7z files should be:

'7z' => 'application/7z',

Thanks StellarBytes, I did as you said, but for some reason I’m receiving an error that the file can not be uploaded. Unfortunately I can not upload from my desktop because the file is over 8MB. I FTP the file to a folder within the store directory to get access to it. I also can not use the server upload command for the same reason, but I was able to solve this when using RAR files by using the URL.

Unless you know of a way to fix this, I may have to experiment with WinZip and hope that I can extract the file on the phone. I tested it one time without satisfaction, but maybe I can get it to work with another extractor.

Thanks for the assistance. :grin:

Edit: Once again thanks for the information! I was able to use WinZip and it work perfectly. I’m not sure why the 7z wouldn’t work.