Re-Used Notification When Uploading Same File Twice Or More at the same time
See original GitHub issueVersion info
- Android Upload Service version: 3.0.3
- Android version and API version: any
- HTTP stack (e.g. HurlStack or OkHttpStack): HurlStack
What did you expect?
Seperate notification
What happened instead?
Re-used notification
Steps to reproduce (if applicable):
I have the same file uploaded twice or more at the same time. The notification from that different uploads will use the same notification.
Library initialization code:
UploadService.NAMESPACE = BuildConfig.APPLICATION_ID;
Request code:
final MultipartUploadRequest multipartUploadRequest = new MultipartUploadRequest(this, mCurrentPhotoPath, url)
.setNotificationConfig(getNotificationConfig(mCurrentPhotoPath))
.setMaxRetries(0);
multipartUploadRequest.addFileToUpload(uriToUpload.getPath(), "file");
multipartUploadRequest.addParameter("some param key", "value");
multipartUploadRequest.addHeader("some cookie key", "value");
multipartUploadRequest.startUpload();
Where have you added the request code?
- Activity
- Service
- Other class (add additional info about it)
Additional info
Basically the code in the Request code
section above, called twice or more in a short time with the same file.
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Filereader - upload same file again not working - Stack Overflow
If you upload the same file the value of the file input has not changed from the previous upload and therefore isn't triggered....
Read more >How to stop sharepoint from uploading the same file again ...
Asks me if I want to replace the existing file. 3. Then uploads the entire file again. Is there a way to make...
Read more >[BUG] dcc.Upload does not support re-upload the same file.
It appears that if one uses the dcc.Upload.contents property for triggering callback, it fails when the user tries to upload the same file...
Read more >Box File Request FAQ - Box Support
Can someone upload the same file twice in an upload zone? No. It's not possible to upload the same file more than once...
Read more >A strategy for handling multiple file uploads using JavaScript
So, you need to get files from your user's browser to your server. Not just one file though. A whole bunch. A batch...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@hendrawd you have explained your scenario well even in the previous post. What I suggest you to do in your case is simply:
The
id
which you will get from:in this case is the same
uploadId
you have passed in the constructor, so you know theid
even before thestartUpload
method invocation, because you generated it. Scenario like yours are exactly the reason why I’ve implemented also the constructor in which you can pass your ownuploadId
.Some reference: MultipartUploadRequest constructor | startUpload method
Yes, i know. Sorry i wasn’t really clear from my last post. I edited your library to use notification action button #181 because of my requirement. The button just simply a cancel action.
I can create NotificationAction by:
Then i set it to NotificationConfig
Then i set it to MultipartUploadRequest
I can’t get the id before i call
But i must set the canceller with ID before call startUpload, that’s why i create the ID directly