Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How really maxFiles works? #2230

Open
Kcko opened this issue Mar 25, 2023 · 2 comments
Open

How really maxFiles works? #2230

Kcko opened this issue Mar 25, 2023 · 2 comments

Comments

@Kcko
Copy link

Kcko commented Mar 25, 2023

I have this event, because after success event i want to show file from database (this is needed for relationship between user and database row etc.

So ...

  1. Success event
  2. Temp file is deleting
  3. Save to dropzone real file from DB with all metadata´s.

Ok, but in this case property maxFiles doesnt work, i can upload how many files as i want when i upload it partially (for example one by one), how to solve it?

`
dropzone.on("success", function(file) {

             if (file.accepted) {
                
                dropzone.removeFile(file);
                let json = JSON.parse(file?.xhr?.response)
                let mockFile = { name: json.P2.file.name, size: json.P2.file.size, internalId: json.P2.file.name };
                dropzone.displayExistingFile(mockFile, json.P2.file.url);

             }
        });`
@Kcko
Copy link
Author

Kcko commented Mar 27, 2023

Looks like a dead project :/.

I helped myself with smaller workaround, made an auxiliary small js object and count it from the outside.

@lilas-dev
Copy link

maxFiles is check for accepted files, when file updated two server, you need reduce the maxFiles in options

Here is the guide: #1909

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants