|
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.
|
|
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.aspxInside 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!
|
|
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.
|
|
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!
|
|