Welcome, Guest
Username: Password: Remember me

TOPIC: File Upload configuration

File Upload configuration 14 Feb 2012 14:33 #1293

  • BTB300
  • BTB300's Avatar
  • Offline
  • Moderator
  • Posts: 414
  • Thank you received: 130
  • Karma: 46
Could someone please explain the configuration settings of the file upolad field

why is there some green and white fields in the file upload configuration box on the tables view
- I figured out that the white ones are music mime types
- and the other green ones are general file types
- if i tick all files types in the list and click save
- open the properties box again
- only the green ones remain ticked WHY?

- is there any mime file validation behind the items in the list or does it just check the file extension

in other words does it read the file and check specific things related to each file type

or

does it just look for the mime extension like "application/x-zip" and file extension ".zip"

- if we add a new file type where do we need to define the file upload checking code

Thanks in advance
Last Edit: 14 Feb 2012 14:43 by BTB300.
The administrator has disabled public write access.

Re: File Upload configuration 14 Feb 2012 15:02 #1299

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
The mime configuration properties.

It is only a non exhaustive list, there is nothing special more.
You can add as many entries as you want.

The white entries are mistake (you shouldn't see them). It was the beginning of a work to list all the possible mime types and finally not very usefull for the moment. I removed them.

Green means that your entry is recognized (validation ok)
White means something is missing
Red means an error in (not unique for example)

Click the [+] button to add a new mime, fill the informations and tick-it.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: File Upload configuration 14 Feb 2012 15:25 #1303

  • BTB300
  • BTB300's Avatar
  • Offline
  • Moderator
  • Posts: 414
  • Thank you received: 130
  • Karma: 46
Thanks for the quick reply

Yes the mime type was missing for the audio files
Some vaild MIME types for .mp3 files follow if it helps complete the project

audio/mpeg
audio/x-mpeg
audio/mp3
audio/x-mp3
audio/mpeg3
audio/x-mpeg3
audio/mpg
audio/x-mpg
audio/x-mpegaudio
there may be a few more...

depending on your browser depends on what actually works

so where in our downloaded files do we start to look for the validation code - looking to ensure that there is strict file checks

Thanks again
Last Edit: 14 Feb 2012 15:31 by BTB300.
The administrator has disabled public write access.

Re: File Upload configuration 14 Feb 2012 16:05 #1304

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Thank you very much for the list.

For the moment Cook doesn't handle audio and video file, so better to leave this as it is to do not create confusion.

Have good work.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: File Upload configuration 27 Feb 2012 12:43 #1458

  • BTB300
  • BTB300's Avatar
  • Offline
  • Moderator
  • Posts: 414
  • Thank you received: 130
  • Karma: 46
Have just one question regarding upload - what am i missing...???
- i have defined custom mime types and extensions in the builder
- it will upload in sandbox but the same file fails locally and on live site.
Being able to upload to sandbox indicates that the code is working...
- it gives the (application/force-download), allowed Mimes are...
- and then just lists the mime types that i have defined that work in the sandbox environment
- have defined valid mime types in admin
- could there be another configuration setting that i am missing

- as detailed in my original ticket --> I am also seeing the error in admin Missing argument 2 for JApplication::getUserStateFromRequest(),

Just guessing: but could the two issues be related to a permission issue. such as it cant tell im a super admin so the upload fails
Any Help appreciated
Last Edit: 27 Feb 2012 12:45 by BTB300. Reason: fixed typo
The administrator has disabled public write access.

Re: File Upload configuration 27 Feb 2012 12:59 #1459

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
There is a topic about that :

www.j-cook.pro/forum/18-closed-tickets/9...ue?limit=10&start=10

But I think it is a problem of configuration of your PHP. (MIME detection)

Mime check is much more for ergonomy than for security (because mime can easily be corrupted)
If an extension has been changed by mistake, it retreive the original type, that's all.

In the topic (quite messy topic), you should understand how to disable mime check if your PHP cannot handle it.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.089 seconds

Get Started