Welcome Guest Search | Active Topics | Sign In | Register

Downloading same file multiple times Options
myWorkspace
Posted: Thursday, December 7, 2017 12:45:43 PM
Rank: Member
Groups: Member

Joined: 1/6/2016
Posts: 19
Hi Team,

How to download same file multiple times. Today I'm able to download to a particular path, but it is not overwriting from second time or not creating a new file with counter at the end of the file name like Chrome Browser does.
Can you please help me in this regard.

Thanks.
eo_support
Posted: Thursday, December 7, 2017 1:20:05 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Hi,

Please try to handle this event and set the event argument's FilePath with code and see if it works:

https://www.essentialobjects.com/doc/eo.webbrowser.webview.beforedownload.aspx

Inside the event handler you can check whether the same file already exist and if it does, you can create a new file name with the counter appended to the end and set it to e.FilePath.

Please let us know if this works for you.

Thanks!
myWorkspace
Posted: Thursday, December 7, 2017 1:50:49 PM
Rank: Member
Groups: Member

Joined: 1/6/2016
Posts: 19
Thanks for quick reply.
We have that logic as final option. Disadvantage is that we need to keep on checking until new name of the file does not exists. If I download a file for 50 times then I need to rotate the file name 51 times to get the next counter.
I thought if there is an ability to handle the creation of the file then we will have options to replace or increase counter of the file automatically.
Please let me know if there is such option available.
eo_support
Posted: Thursday, December 7, 2017 2:03:19 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Hi,

I believe Chrome does it the same way. Our product only include the core browser engine so it does not contain the auto counter part. As such you would need to implement it with your own code.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.