Skip to main content


Sometimes the browser shows the file directly on the browser instead of downloading it. To force the browser to download the file, you can use the getDownloadUrl function.

import { getDownloadUrl } from '@edgestore/react/utils';
url, // the url of the file
'overwrite-file-name.jpg', // optional, the name of the file to download

Format file size

You might want to display the file size in a human readable format. You can use the formatFileSize function to do that.

import { formatFileSize } from '@edgestore/react/utils';
formatFileSize(10485760); // => 10MB