Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: [FIXED] v2.0: 2 File fields with diff allowed mime types

Re: v2.0: 2 File fields with diff allowed mime types 17 Oct 2012 10:34 #4619

  • nvgogh
  • nvgogh's Avatar
  • Offline
  • Junior Member
  • Posts: 22
  • Thank you received: 2
  • Karma: 0
audibleid wrote:
Try re-setting + rebuilding

How to I 'reset & rebuild' ?
audibleid wrote:
not implemented specifically to handle different file formats

It's no issue to not do the file format validation. The edit screen is only used by 'trusted' admins
audibleid wrote:
...exploded fields ...

??? exploded fields ??? What should I envision with that?
The administrator has disabled public write access.

Re: v2.0: 2 File fields with diff allowed mime types 17 Oct 2012 10:40 #4620

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 985
  • Karma: 140
Yes you are right, the gpx should not be instancied in the second one, but the issue is much more complex.
I am working on it since yesterday, and I cannot figure it out.

I explain :

The jQuery validator is very good, but has some limitations. When you use the 'file' rule, it cannot have multiple different regex for the same rule handler.

One possibility for the builder is to create as many rules as there are different group of extensions (2 in your case), but it will create too much files for big projects.

Another solution, wich I will retain is to avoid totally the JS validation of extensions and keep only the PHP validation. It is annoying but I do not have any other solution.

I mean, everything will be available to activate it easily, but possible only if you have the same waited extensions for all the files in the form (in the whole page)

I tried everything, I simply cannot do better. It is a limitation from the jQuery validator.

Stay in touch, I tell you when it is fixed. (Both issues)
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: nvgogh

Re: v2.0: 2 File fields with diff allowed mime types 17 Oct 2012 10:44 #4621

  • nvgogh
  • nvgogh's Avatar
  • Offline
  • Junior Member
  • Posts: 22
  • Thank you received: 2
  • Karma: 0
Hey admin, yes I already figured out that there would be no 'easy' fix. This would entail a (big) rewrite how the validator rules are used (and defined) If time permits I will 'play around' with the issue to see if I can come up with a solution.
The administrator has disabled public write access.

Re: v2.0: 2 File fields with diff allowed mime types 17 Oct 2012 10:46 #4622

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
nvgogh quoting audibleid wrote:
Try re-setting + rebuilding
I meant resetting/re-checking your desired file extensions in the builder
nvgogh quoting audibleid wrote:
not implemented specifically to handle different file formats
I just meant that it seems as if when admin first created the upload field, he didn't anticipate it utilising multiple fields with different extension requirements on each...? I'm asserting that, don't really know for sure. @admin???
nvgogh quoting audibleid wrote:
??? exploded fields ??? What should I envision with that?
Exploded the fields is an option in the builder CONFIG panel. This allows you to override form inputs directly in your view/layout. I'm not 100% this will get you where you want to go but, logically speaking, it should be possible.

I think that my first suggestion of copying the file.php rule, renaming it and updating your xml will be the easiest way to approach this - at least as a test.

Hope this helps,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: v2.0: 2 File fields with diff allowed mime types 17 Oct 2012 10:48 #4623

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
@admin, is this a realistic solution that I suggest?
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: v2.0: 2 File fields with diff allowed mime types 17 Oct 2012 10:54 #4624

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
Just a though, but longer term, what about a couple of extra options in the file field type to allow the auto creation of a new extended file class - similar to the way that custom rules are added. Basically, exactly as on text fields where one can add a custom handler and pipe in the extensions like ext1|ext2|ext3 for the jquery validator?

Just a thought but I know this is far more complex in actuality.

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: v2.0: 2 File fields with diff allowed mime types 17 Oct 2012 11:59 #4625

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 985
  • Karma: 140
Ok, I finally got it.
It is working !!!

The first little issue about gpx that is unchecked is not fixed yet.

Can you give a try please ? And confirm me that it is working...
Coding is now a piece of cake
The administrator has disabled public write access.

Re: v2.0: 2 File fields with diff allowed mime types 17 Oct 2012 12:53 #4626

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 985
  • Karma: 140
Fixed.
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: JoomGuy, nvgogh
  • Page:
  • 1
  • 2
Time to create page: 0.109 seconds

Get Started