CodeIgniter Forums
Upload File library does not suppory doc files - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Upload File library does not suppory doc files (/showthread.php?tid=28025)



Upload File library does not suppory doc files - El Forum - 02-27-2010

[eluser]Unknown[/eluser]
Hello There , i started to work on CI . but when i was trying to work on Upload File Library i figured that it does accept the regular file types such as doc , docx, ppt .. So on ..

So any ideas ? Or its dedicated to images ?

Thanks a lot


Upload File library does not suppory doc files - El Forum - 03-01-2010

[eluser]stommert[/eluser]
Hi,

Ik hope you've read this,
as you can see
Code:
$config['allowed_types'] = 'gif|jpg|png';

can be changed to any given extension.
make sure you add the appropriate mime type in system/application/config/mimes.php
if it still does not work, make sure you output the error message, see the user manual how to do that.

gr.


Upload File library does not suppory doc files - El Forum - 03-01-2010

[eluser]Unknown[/eluser]
Hello .. I did add the extensions to the allowed types ..
but when try to upload i get these errors :
[A PHP Error was encountered

Severity: Notice

Message: getimagesize() [function.getimagesize]: Read error!

Filename: libraries/Upload.php

Line Number: 569]

and the message is : The filetype you are attempting to upload is not allowed.


Upload File library does not suppory doc files - El Forum - 03-01-2010

[eluser]stommert[/eluser]
hi,

what kind of file are you trying to upload?
Remove
Code:
$config['max_width']  = '1024';
$config['max_height']  = '768';
these config items because you they apply to image files.

gr.


Upload File library does not suppory doc files - El Forum - 03-01-2010

[eluser]danmontgomery[/eluser]
Post code.