⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

APK file not uploaded



Ahmed Mirghani

Ahmed Mirghani
  • profile picture
  • Member

Posted 13 March 2015 - 13:25 PM

Hi all,

 

I tried to upload apk file using the great GC library with no succses. I am using CodeIgniter v2.2.1 and grocery-crud v1.5.0.

I added this line:

'apk' 	=> array('application/vnd.android.package-archive', 'application/octet-stream')

to file config/mimes.php.

and edited config/grocery_crud.php and added apk file to the grocery_crud_file_upload_allow_file_types:

$config['grocery_crud_file_upload_allow_file_types'] 		= 'apk|gif|jpeg|jpg|png|tiff|doc|docx|txt|odt|xls|xlsx|pdf|ppt|pptx|pps|ppsx|mp3|m4a|ogg|wav|mp4|m4v|mov|wmv|flv|avi|mpg|ogv|3gp|3g2';

I tried it with employees_management examples code and even simple id, url table.

I can upload pictures and text files fine but apk file failed. What I missed??

 

Thanks in advance.


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 16 March 2015 - 01:43 AM

Find the mimes.php. For CodeIgniter version 2.x, it will be inside:

application/config/


And for previous version, it will be inside:

system/application/config/


Add this line:

'apk' => 'application/octet-stream'

This work fine but I advice to add this line:
'apk' => array('application/vnd.android.package-archive', 'application/octet-stream')

 

that should do the magic trick


Ahmed Mirghani

Ahmed Mirghani
  • profile picture
  • Member

Posted 17 March 2015 - 18:16 PM

Hi Amit,

 

I already did these changes as mentioned above!!

And BTW I came across the same answer as your in EE.

 

regards,


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 20 March 2015 - 19:50 PM

sorry for a delayed reply - but then i believe that might have to do with the upload size .. by default in php its set to 2mb