Skip to content

Commit

Permalink
Merge pull request #48241 from bernhardoj/fix/47646-disable-preview-w…
Browse files Browse the repository at this point in the history
…hile-uploading

Disable attachment preview until it's uploaded
  • Loading branch information
srikarparsi authored Sep 1, 2024
2 parents 117b961 + d44ff01 commit fc849dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4049,7 +4049,8 @@ function getUploadingAttachmentHtml(file?: FileObject): string {

// file.type is a known mime type like image/png, image/jpeg, video/mp4 etc.
if (file.type?.startsWith('image')) {
return `<img src="${file.uri}" alt="${file.name}" ${dataAttributes} />`;
// optimistic image will have its preview disabled until we receive the (compressed if too big) image from the BE
return `<img src="${file.uri}" alt="${file.name}" ${dataAttributes} data-expensify-preview-modal-disabled="true" />`;
}
if (file.type?.startsWith('video')) {
return `<video src="${file.uri}" ${dataAttributes}>${file.name}</video>`;
Expand Down

0 comments on commit fc849dd

Please sign in to comment.