Hi guys,
how can extend this module to limit the number of uploaded files?
The limit should be relative of the role that the users have.

Or already exist?

Thanks
hachreak

Comments

kongoji’s picture

Hi hachreak,
your question is very interesting, but I believe it could be more related to CCK module than FileField or FileField Role Limit modules.
This is because FileField module relies on CCK module to set the maximum number of values.
My suggestion is to use the hook_form_alter() to make the field fit your needs, in particular you could read an example here.

Another solution you could keep an eye on could be using User Quota or Node Limit Number module to let user create a limited set of nodes. This would work pretty well if you let user create a node for every file, limiting FileField number of values to only one file uploadable per node, but I'm not sure this solution would be ok for you.

I leave this thread open, I'm very interested to know if other solutions other than these are possible.

kongoji’s picture

Status: Active » Postponed (maintainer needs more info)

Since 4 weeks passed away without any reply, I put this on "posponed" status.
Feel free to re-open this issue as soon as you have new questions or solutions.
Greetz

webadpro’s picture

I would also be interested into this but for D7.

kongoji’s picture

Hi webadpro,
the best option is to use a form_alter() workaround to limit number of upload fields by role.
I will look if this is a feature I can add to the next 7.x-1.x version, but right now I suggest you to implement that workaround or to use modules like User Quota or Nod Limit Number