1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-12 22:44:11 +00:00

wip files demo

This commit is contained in:
William Martin
2024-12-13 08:51:10 -05:00
parent 84dfa3ab05
commit e854197bc5
12 changed files with 319 additions and 1 deletions

View File

@@ -158,6 +158,7 @@ export class AttachmentsComponent implements OnInit {
this.emergencyAccessId,
);
url = attachmentDownloadResponse.url;
alert(url);
} catch (e) {
if (e instanceof ErrorResponse && (e as ErrorResponse).statusCode === 404) {
url = attachment.url;
@@ -239,6 +240,7 @@ export class AttachmentsComponent implements OnInit {
this.reuploadPromises[attachment.id] = Promise.resolve().then(async () => {
// 1. Download
a.downloading = true;
alert(attachment.url);
const response = await fetch(new Request(attachment.url, { cache: "no-store" }));
if (response.status !== 200) {
this.platformUtilsService.showToast("error", null, this.i18nService.t("errorOccurred"));