|
|
@ -330,12 +330,12 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState( |
|
|
|
return { |
|
|
|
return { |
|
|
|
mimetype: response.headers.get('content-type') || undefined, |
|
|
|
mimetype: response.headers.get('content-type') || undefined, |
|
|
|
size: +(response.headers.get('content-length') || 0) || undefined, |
|
|
|
size: +(response.headers.get('content-length') || 0) || undefined, |
|
|
|
} as { minetype?: string; size?: number } |
|
|
|
} as { mimetype?: string; size?: number } |
|
|
|
} else if (imageUrl.slice(imageUrl.lastIndexOf('.') + 1).toLowerCase().length) { |
|
|
|
} else if (imageUrl.slice(imageUrl.lastIndexOf('.') + 1).toLowerCase().length) { |
|
|
|
return { |
|
|
|
return { |
|
|
|
mimetype: `image/${imageUrl.slice(imageUrl.lastIndexOf('.') + 1).toLowerCase()}`, |
|
|
|
mimetype: `image/${imageUrl.slice(imageUrl.lastIndexOf('.') + 1).toLowerCase()}`, |
|
|
|
size: +(response.headers.get('content-length') || 0) || undefined, |
|
|
|
size: +(response.headers.get('content-length') || 0) || undefined, |
|
|
|
} as { minetype?: string; size?: number } |
|
|
|
} as { mimetype?: string; size?: number } |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (err) { |
|
|
|
} catch (err) { |
|
|
|