• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

File upload cancelation

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends.

Im uploading a file, using on client side HttpClient from org.apache.commons package.

Im streaming the file to the server.

How can I let a user cancel the upload nicely?

Im using HttpClient code like this, implemented with a listener.





My class with listener and write methods...




How is the best way to cancel the stream to the server.
I havent find anything in HttpClient to achieve this.
Maybe there is a way to subclass and override, but I have not managed to
figure that out.


Any help appreciated

Best Regards
Bjorn
 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To cancel an upload, just change the src of the iframe you're doing the uploading work... For example:



Hope this helps
reply
    Bookmark Topic Watch Topic
  • New Topic