Skip to content

Commit c66b6f0

Browse files
committed
Updates
1 parent 2ed164a commit c66b6f0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

aspnetcore/blazor/file-uploads.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,10 +904,11 @@ The default thumbnail (`default-thumbnail.jpg`) is at the project root with a **
904904
The `Movie` model (`Movie.cs`) has a property (`Thumbnail`) to hold the thumbnail image data:
905905

906906
```csharp
907+
[Column(TypeName = "varbinary(MAX)")]
907908
public byte[]? Thumbnail { get; set; }
908909
```
909910

910-
Image data is stored in a byte array (`byte[]`) in the database. The app base-64 encodes the bytes for display because base-64 encoded data is roughly a third larger than the raw bytes of the image, thus base-64 image data requires additional database storage and reduces the performance of database read/write operations.
911+
Image data is stored as bytes in the database as [`varbinary(MAX)`](/sql/t-sql/data-types/binary-and-varbinary-transact-sql). The app base-64 encodes the bytes for display because base-64 encoded data is roughly a third larger than the raw bytes of the image, thus base-64 image data requires additional database storage and reduces the performance of database read/write operations.
911912

912913
Components that display the thumbnail pass image data to the `img` tag's `src` attribute as JPEG, base-64 encoded data:
913914

0 commit comments

Comments
 (0)