question

Nimalika-6845 avatar image
0 Votes"
Nimalika-6845 asked RoyLi-MSFT commented

UWP Background Downloader multiple downloads

Hi,
We are using UWP Background downloader to download video files. We are doing parallel downloads. We need to replace the video file if the same file is being downloaded again.

StorageFile destinationFile = await videoFolder.CreateFileAsync(
file, CreationCollisionOption.ReplaceExisting);

But if two video files with same name get downloaded at the same time can there be any issues occurred?

If we are to download same file with two download operations at the same time what is the recommended way to do that. (we need to have the same name for both files)
Thank you.

windows-uwp
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@Nimalika-6845 Haven't heard from you for a while, have you solved your issue? Does Nico's reply make sense? Please consider accepting Nico's reply as answer if his reply helps you solve the issue. This could help others who have the same issue.

0 Votes 0 ·

1 Answer

NicoZhu-MSFT avatar image
0 Votes"
NicoZhu-MSFT answered NicoZhu-MSFT edited

Hello, Welcome to Micorosoft Q&A,

But if two video files with same name get downloaded at the same time can there be any issues occurred?

It will create download file before downloading start, so the last one will replace previous one(`videoFolder.CreateFileAsync(
file, CreationCollisionOption.ReplaceExisting)`).

If we are to download same file with two download operations at the same time

If you want to download same file with two download operations at the same time, please create download files in the different folder,





If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.