PHP Simplicity Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

I am not always around so I might be late on replying.

Author Topic: extension attributes  (Read 3611 times)

0 Members and 1 Guest are viewing this topic.

Appie

  • Guest
extension attributes
« on: January 07, 2005, 07:48:15 AM »

Yoo im back :P . I noticed something you might want to look at?
When uploading a jpg file it works how it always works. Same goes for txt files..You always get a message that upload was succesfull, but when trying to upload a mp3 ,wma or a rm file it upload perfect but you will not see any message that the upload succeeded. How can i fix that ???

Thanks!
Logged

Saleh

  • Administrator
  • Full Member
  • *****
  • Offline Offline
  • Posts: 222
    • View Profile
    • PHP Simplicity
Re: File size limits
« Reply #1 on: January 07, 2005, 09:28:56 AM »

what is the attribute you put for these files?
did you use package ?
$allowed['package'][] = 'mp3'; ?
Logged

We don't need a reason to help people

Saleh

  • Administrator
  • Full Member
  • *****
  • Offline Offline
  • Posts: 222
    • View Profile
    • PHP Simplicity
Re: File size limits
« Reply #2 on: January 07, 2005, 09:38:12 AM »

forgive me I uploaded 2 files (Blue.mp3 and 002.gif) to test it ..
and as you said it didn't show it! strange!?
I tried here (my server) and it works!

I need to know how your SFUConfig.php file goes in the attribute part!
or did you modify functions.php ?
« Last Edit: January 07, 2005, 09:40:45 AM by Saleh »
Logged

We don't need a reason to help people

Appie

  • Guest
Re: File size limits
« Reply #3 on: January 07, 2005, 10:19:36 AM »

 :D i saw it!  Blue is funny!

I only changed the SFUConfig . I added this:

$allowed['audio/x-ms-wma'][] = 'wma';
$allowed['video/x-ms-wmv'][] = 'wmv';
$allowed['audio/x-mp3'][] = 'mp3';
$allowed['video/x-mpg'][] = 'mpg';
$allowed['video/x-mpeg'][] = 'mpeg';
$allowed['Real Audio/Video'][] = 'rm';

functions.php is still the same as when i downloaded it.. mmm maybe i have to use:

$allowed['package'][] = 'mp3'; ?

Im gonna try it right away ;)

I hope you can help me :) 

p.s
when you uploaded to me.. did it go fast or slow??
I havent tried it out on school yet because of the holidays :D
Logged

Saleh

  • Administrator
  • Full Member
  • *****
  • Offline Offline
  • Posts: 222
    • View Profile
    • PHP Simplicity
Re: File size limits
« Reply #4 on: January 07, 2005, 10:42:30 AM »

what did you just do, man!!!
it's:

$allowed
['package'][] = 'wma';
$allowed['package'][] = 'wmv';
$allowed['package'][] = 'mp3';
$allowed['package'][] = 'mpg';
$allowed['package'][] = 'mpeg';
$allowed['package'][] = 'rm';


I should look into that!
it shouldn't allow new attributes to be added like that and then just upload the files!
be careful! if you missed like that with exectuable files, you might end up with your website destroyed!!
man, you should read the instruction carefully!
Logged

We don't need a reason to help people

Appie

  • Guest
Re: File size limits
« Reply #5 on: January 07, 2005, 10:57:12 AM »

 :o OOOPS!!

I will change the attributes right away!!
I read it.. but yeah little bit  to hasty :'(  im sorry!!~

And yeah.. maybe thats why my site is off sometimes!!

Thanks for your help Saleh!! 
Logged

Saleh

  • Administrator
  • Full Member
  • *****
  • Offline Offline
  • Posts: 222
    • View Profile
    • PHP Simplicity
Re: File size limits
« Reply #6 on: January 07, 2005, 11:04:36 AM »

Quote
And yeah.. maybe thats why my site is off sometimes!!
no, it has nothing to do with SFU!
what might make it dangerous is if you enabled php files as say:
$allowed['application/php-x'][] = 'php';
that would be %1000 risky!

but since they were only music/video files, no worries! :)
« Last Edit: January 07, 2005, 11:07:03 AM by Saleh »
Logged

We don't need a reason to help people

Appie

  • Guest
Re: extension attributes
« Reply #7 on: January 07, 2005, 11:29:48 AM »

 :D AAH... that make's me feel much better!!

i added this to the config:
$allowed['package'][] = 'wma';
$allowed['package'][] = 'wmv';
$allowed['package'][] = 'mp3';
$allowed['package'][] = 'mpg';
$allowed['package'][] = 'mpeg';
$allowed['package'][] = 'rm';

It works great now!! Thanks again!!
Logged

Saleh

  • Administrator
  • Full Member
  • *****
  • Offline Offline
  • Posts: 222
    • View Profile
    • PHP Simplicity
Re: extension attributes
« Reply #8 on: January 07, 2005, 12:04:40 PM »

you have to remove these however:
$allowed['audio/x-ms-wma'][] = 'wma';
$allowed['video/x-ms-wmv'][] = 'wmv';
$allowed['audio/x-mp3'][] = 'mp3';
$allowed['video/x-mpg'][] = 'mpg';
$allowed['video/x-mpeg'][] = 'mpeg';
$allowed['Real Audio/Video'][] = 'rm';

Logged

We don't need a reason to help people

Appie

  • Guest
Re: extension attributes
« Reply #9 on: January 07, 2005, 12:13:46 PM »

I removed them..   ;)

Thanks for all the help!
Logged
 

+ Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.
Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What is the answer to one plus one? (in numbers):