-
Notifications
You must be signed in to change notification settings - Fork 313
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
FileUploader is triggering 2 uploads to s3 when using ProcessFile prop #5817
Comments
Hey @brandonwatson sorry you're experiencing this issue. Thanks for providing all this information. I was able to reproduce this and confirmed that removing the I noticed when I refresh the page it works as expected, it's only after one file has already been uploaded that it becomes an issue. Are you seeing that as well? |
Can you explain that second paragraph a little better? I guess I haven't been cold loading the page after a recompile, restarting NPM run Dev, I don't think. But I don't know the refreshing at anything to do with it. But I can certainly check that if you can be a bit more explicit with your repro steps.
…________________________________
From: Emma Sauerborn ***@***.***>
Sent: Friday, September 20, 2024 9:12:34 AM
To: aws-amplify/amplify-ui ***@***.***>
Cc: Brandon Watson ***@***.***>; Mention ***@***.***>
Subject: Re: [aws-amplify/amplify-ui] FileUploader is triggering 2 uploads to s3 when using ProcessFile prop (Issue #5817)
Hey @brandonwatson<https://github.com/brandonwatson> sorry you're experiencing this issue. Thanks for providing all this information. I was able to reproduce this and confirmed that removing the processFile prop fixes the issue. We'll start working on a fix and will provide updates here.
I noticed when I refresh the page it works as expected, it's only after one file has already been uploaded that it becomes an issue. Are you seeing that as well?
FYI @tytremblay<https://github.com/tytremblay> @OperationalFallacy<https://github.com/OperationalFallacy>
—
Reply to this email directly, view it on GitHub<#5817 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AABV5JJDHLHLHWMHQ4INRFTZXQ3ODAVCNFSM6AAAAABORAUZO2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRTHE3DAOBVGM>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@brandonwatson Yeah I just meant hitting the refresh button on the web browser and then uploading a file. |
@tytremblay thanks for the heads up. When I was director of developer platform for Windows Phone I was a pretty public figure and had no problem publishing my phone number. Who's one of my core team principles about being universal accessible to our customers. I'm sure my Colorado number is out there now with everything I do, but I went ahead and removed it all the same. |
I tried your repro and hit refresh. This did not change anything in terms of outcome. I still had two file uploads. Some more project info, in case this is helpful - and please ask for any additional data.
UPDATE
|
@brandonwatson Was able to repro the issue, we are working on a fix now |
This has been fixed in the latest version |
I have removed 3.3.3, and ran npm install @aws-amplify/ui-react-storage@latest which updated to 3.3.4. For anyone else who had this issue and was updating, this is not sufficient. I had to take the extra step of perm deleting node_module directory and running npm install for this change to take effect. 3.3.4 appears to no longer double upload files. |
Before creating a new issue, please confirm:
On which framework/platform are you having an issue?
React
Which UI component?
Storage
How is your app built?
Next.js
What browsers are you seeing the problem on?
Microsoft Edge
Which region are you seeing the problem in?
us-west-1
Please describe your bug.
Usiing FileUploader from '@aws-amplify/ui-react-storage' and utilizing the ProcessFile prop is causing a double upload. I was on:
"@aws-amplify/ui-react-storage": "^3.3.1",
and updating to:
"@aws-amplify/ui-react-storage": "^3.3.3",
Did not solve the problem.
I had found this old bug: #5467, and it appeared that it was closed and fixed back in 3.1.6 but I can replicate this problem.
What's the expected behaviour?
One file upload. I have confirmed that the removal of the ProcessFile prop reverts back to the behavior of one file being uploaded.
I am simply trying to change the file name to something that is UUIDv4 based. Nothing crazy. I can confirm that two files are uploaded to S3. I can confirm that the processFile function is being called twice.
Help us reproduce the bug!
Code Snippet
// Put your code below this line.
Console log output
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: