mobilesfeatures / gwtupload

Automatically exported from code.google.com/p/gwtupload
Other
0 stars 0 forks source link

REPEATED file doesn't throw warning #74

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Try uploading a file again with MultiUploader
2.
3.

What is the expected output? What do you see instead?
An error message should be thrown. While the file is not attached again (good), 
the library doesn't show a warning message to the user.

What version of the product are you using? On what operating system?

0.6.2, Windows
Please provide any additional information below.
I was able to circumvent this problem by adding this code...

OnStatusChangedHandler onStatusChangedHandler = new OnStatusChangedHandler() {

            @Override
            public void onStatusChanged( IUploader uploader ) {
                if (uploader.getStatus() == Status.REPEATED) {
                    Window.alert( "file already attached" );
                }
            }
        };

but for some reason, this is only fired upon first attempt to attach a 
duplicate. subsequent attempts to attach the same file don't generate the 
'status changed' event.

Original issue reported on code.google.com by sandeep....@gmail.com on 25 Sep 2010 at 3:37

GoogleCodeExporter commented 8 years ago
We found a workaround for this one...

OnStatusChangedHandler onStatusChangedHandler = new OnStatusChangedHandler() {

            @Override
            public void onStatusChanged( IUploader uploader ) {
                    Uploader u = (Uploader) uploader;
                if (uploader.getStatus() == Status.REPEATED) {
                    Window.alert( "file already attached" );
                    u.getFileInput().setVisible(false);
                }
            }
        };

Original comment by sandeep....@gmail.com on 18 Dec 2010 at 1:05

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r818.

Original comment by manuel.carrasco.m on 29 Dec 2010 at 9:42

GoogleCodeExporter commented 8 years ago
Thanks for reporting

Original comment by manuel.carrasco.m on 29 Dec 2010 at 10:07