Jump to content

Field files allowed number and setMaxFiles()


Manaus
 Share

Recommended Posts

Hello,

I have the setMaxFiles(1) function in a script for file uploading, but the field is set to 3 for Maximum Files Allowed. Is there any conflict between the two? I guess the field definition wins, but why using the function then?

Thanks!

Link to comment
Share on other sites

 I have the setMaxFiles(1) function in a script for file uploading, but the field is set to 3 for Maximum Files Allowed. Is there any conflict between the two? I guess the field definition wins, but why using the function then?

Hi, I think you need to save the field after calling setMaxFiles.

Link to comment
Share on other sites

Oh, if it isn't in the docs or when I cannot find it, I look into the code: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/WireUpload.php#L85

using the browsers "find function" searching for "maxFiles" point me quickly to the interesting parts. So, best would be to have it in the docs, but to look at the code is better than nothing ;)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...