UWP Background Downloader multiple downloads

Nimalika 21 Reputation points
2021-06-16T08:06:20.67+00:00

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.

Universal Windows Platform (UWP)
{count} votes

1 answer

Sort by: Most helpful
  1. Nico Zhu (Shanghai Wicresoft Co,.Ltd.) 12,866 Reputation points
    2021-06-17T03:08:31.437+00:00

    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.