mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-19 04:24:55 +00:00
feat: Add ability to paste file/image from clipboard (#5627)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
This commit is contained in:
@@ -11,11 +11,7 @@ export const formatBytes = (bytes, decimals = 2) => {
|
||||
};
|
||||
|
||||
export const fileSizeInMegaBytes = bytes => {
|
||||
if (bytes === 0) {
|
||||
return 0;
|
||||
}
|
||||
const sizeInMB = (bytes / (1024 * 1024)).toFixed(2);
|
||||
return sizeInMB;
|
||||
return bytes / (1024 * 1024);
|
||||
};
|
||||
|
||||
export const checkFileSizeLimit = (file, maximumUploadLimit) => {
|
||||
|
||||
Reference in New Issue
Block a user