CodeIgniter Forums
Upload issue with new filetype - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Upload issue with new filetype (/thread-48205.html)



Upload issue with new filetype - El Forum - 01-08-2012

[eluser]Unknown[/eluser]
I've been trying to upload a file to my webserver and used the example from the File uploading class documentation. Works great for PNG, jpg etc., but I'm trying to upload .unity3d and .swf files and both don't work. I've checked the mimes.php and although there is a .swf mime type already included in vanilla CodeIgniter, I can't upload a SWF file.

Even with the Unity3d file, same here: "The filetype you are attempting to upload is not allowed."

From controller:
$config['allowed_types'] = 'jpg|unity3d|unity|png|swf';//unity3d|jpg|png
$config['max_size'] = 0; // to allow any size

From mimes.php
original entry: 'swf' => array('application/x-shockwave-flash'),

What I added:
'unity3d' => array('application/vnd.unity', 'application/unity3d', 'application/unity', 'application/octet-stream'),
(the array because of tearing out hairs because nothing worked)

As said, png and jpg work. Any hint what I do wrong?

Thanks
Martin