This article is a mirror article of machine translation, please click here to jump to the original article.

View: 3192|Reply: 1

[JavaScript] The front-end JS converts base64 into a blob and displays the image

[Copy link]
Posted on 10/15/2023 7:36:53 PM | | | |
Requirements: The backend converts the image byte[] into base64 and returns it to the frontend, and the frontend stores the base64 in the img and displays it too big, and wants to convert the base64 into a blob and then generate a url through createObjectURL to display in the img.

Let's take a look at the renderings first:



Backend code:



Front-end code:

(End)




Previous:WireGuard-based access to peer LAN access
Next:.NET/C# try-catch-when syntax
Posted on 12/21/2023 5:14:16 PM |
Prompt:Authors are banned or removed content is automatically blocked
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com