mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-02 20:58:12 +00:00
4.6.3-website dataset (#532)
This commit is contained in:
@@ -35,9 +35,9 @@ export const uploadFiles = ({
|
||||
*/
|
||||
export const compressBase64ImgAndUpload = ({
|
||||
base64,
|
||||
maxW = 200,
|
||||
maxH = 200,
|
||||
maxSize = 1024 * 100, // 100kb
|
||||
maxW = 1080,
|
||||
maxH = 1080,
|
||||
maxSize = 1024 * 500, // 300kb
|
||||
expiredTime
|
||||
}: {
|
||||
base64: string;
|
||||
@@ -77,7 +77,7 @@ export const compressBase64ImgAndUpload = ({
|
||||
}
|
||||
|
||||
ctx.drawImage(img, 0, 0, width, height);
|
||||
const compressedDataUrl = canvas.toDataURL(fileType, 0.8);
|
||||
const compressedDataUrl = canvas.toDataURL(fileType, 1);
|
||||
// 移除 canvas 元素
|
||||
canvas.remove();
|
||||
|
||||
|
Reference in New Issue
Block a user