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

QUploader - Uploading same file twice #6537

Closed
jd-solanki opened this issue Mar 3, 2020 · 10 comments
Closed

QUploader - Uploading same file twice #6537

jd-solanki opened this issue Mar 3, 2020 · 10 comments
Assignees

Comments

@jd-solanki
Copy link

Describe the bug

BUG 1: If we upload same file twice or files with same name, uploader component gives duplicate key warning. You can check it in the multiple demo of quasar docs.

BUG 2: Now if we remove any file from duplicates, all images with that name get removed.

Codepen/jsFiddle/Codesandbox (required)
BUG 1: You can check this in multiple demo in quasar docs
BUG 2: Same

To Reproduce

Bug 1
Steps to reproduce the behavior:

  1. Go to above link in docs
  2. Click on codepen icon
  3. In first demo of multiple upload same file twice.
  4. Check console.
  5. See error

Bug 2

  1. Follow above steps and try to remove any of duplicate files.
  2. Both files will get removed even if we remove on one.

Expected behavior
Files with same name should not give error. This can easily get handled by index. And for removing file, only that file should get removed.

Screenshots
quasar-same

Platform (please complete the following information):
OS: Ubuntu
Node: 12
NPM: 6.13.4
Yarn: 1.21.1
Browsers: Chrome
iOS: Not tested
Android: Not tested
Electron: Not tested

Additional context
I think index should be used to mitigate duplicate keys warning. For bug-2 index kind of thing should do it.

I love to make PR but I am not yet fully understand how quasar handles same code on all devices. So I can not.

~ Thanks for developing such great framework

@jd-solanki
Copy link
Author

Sorry for the issue. I was trying to make PR and found that it is already handled.

How: Files with same name will not be added in uploader.

Closing this.

@jd-solanki jd-solanki reopened this Mar 3, 2020
@jd-solanki
Copy link
Author

It is still not working in package. I checked node_modules folder and found that code is not present in source.

@rstoenescu
Copy link
Member

What code is not present in the source?

@jd-solanki
Copy link
Author

Hi, @rstoenescu
repo clone:
source

Node Modules:
node_modules

@jd-solanki
Copy link
Author

Duplicate key issue can be mitigated if we use slot and render list on our but removing file still removes files with same name.

@rstoenescu
Copy link
Member

Then update your project's Quasar version... It means you are on an older version.

@jd-solanki
Copy link
Author

Hello @rstoenescu I am already on latest version 1.9.7. You can check this issue in codepen also if you like.

@rstoenescu
Copy link
Member

With all due respect, we ship what it is on our repo, not something else. So please figure out why you have other version installed. Thank you.

@jd-solanki
Copy link
Author

jd-solanki commented Mar 5, 2020

Hi @rstoenescu,
Sorry for the trouble. I have inspected the issue and found that this exist in the latest version of the quasar framework.

I have made a clone few days back(or maybe a month). In that version, code was present to prevent duplicates. So, this was the confusion. I am really sorry.

But I am sure that this issue still exist in latest/current version of quasar qUploader. So can you please open this issue again.

You can check this issue in codePen.

~ Thanks for your time 🙏

@rstoenescu rstoenescu reopened this Mar 5, 2020
hawkeye64 added a commit to hawkeye64/quasar that referenced this issue Mar 5, 2020
@hawkeye64 hawkeye64 self-assigned this Mar 5, 2020
hawkeye64 added a commit to hawkeye64/quasar that referenced this issue Mar 5, 2020
rstoenescu pushed a commit that referenced this issue Mar 10, 2020
* fix(QUploader):  Uploading same file twice (#6537)

Restoring duplicate file filter

* fix(QUploader): Uploading same file twice (#6537)
@rstoenescu
Copy link
Member

Fix will be available in "quasar" v1.9.9.

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

No branches or pull requests

3 participants