Exemplo n.º 1
0
        protected async void DownloadBy(LibraryModel model)
        {
            if (!string.IsNullOrEmpty(model.FileName))
            {
                byte[] fileBytes = await FileStorageManager.DownloadAsync(model.FileName, "");

                if (fileBytes != null)
                {
                    // DownCount
                    model.DownCount = model.DownCount + 1;
                    await UploadRepositoryAsyncReference.EditAsync(model);

                    await FileUtil.SaveAs(JSRuntime, model.FileName, fileBytes);
                }
            }
        }