• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Uploadify + Upload Class

#7
[eluser]Philo01[/eluser]
[quote author="Cro_Crx" date="1266244076"][quote author="Philo01" date="1266243560"]
Anyway to get around this problem?[/quote]

Uplodify isn't going to send the correct MIME type in the headers so you can't rely on it being accurate. You extend the uploader class and overright the is_allowed_filetype method to check the file extension rather than the MIME type.

Uploadify also has an option to allow files based on file extension, check the documentation for the parm 'fileExt'.[/quote]

Yes I know about the fileExt parameter, although people could just edit the javascript and change it using a inline html editor like firebug, and just add there own extension.

Although, what I could do is check if they where modified.
Lets say the file types are retrieved from the database.

I can check if the allowed filetypes in the database match the fileExt send by Uploadify.
Should be quite secure right? I just want people to be able to upload image formats.

Besides that I can check if the upload data is_image is 1. And check the file_ext again for extra security.
Think that would do?

Edit

I just noticed that when uploading it ignores everything:

Code:
$config['upload_path'] = './uploads/';
        $config['allowed_types'] = 'jpg|jpeg|png';
        $config['max_size']    = '100';
        $config['max_width']  = '10';
        $config['max_height']  = '10';

When I upload a to large image it will upload, while it should reject it.
When I print out the $this->upload->data() array it only returns the number 1.
Is this correct? Does CI ignore the other configs when uploading via uploadify.

Edit
I found out that the array does contain data, all but the width and height.
Anyone know how why this is?

Kind regards,

Philo


Messages In This Thread
Uploadify + Upload Class - by El Forum - 02-14-2010, 10:14 AM
Uploadify + Upload Class - by El Forum - 02-14-2010, 08:31 PM
Uploadify + Upload Class - by El Forum - 02-14-2010, 10:21 PM
Uploadify + Upload Class - by El Forum - 02-15-2010, 02:11 AM
Uploadify + Upload Class - by El Forum - 02-15-2010, 02:19 AM
Uploadify + Upload Class - by El Forum - 02-15-2010, 02:27 AM
Uploadify + Upload Class - by El Forum - 02-15-2010, 02:36 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.