fully added profile photo submission

This commit is contained in:
Daniel
2023-05-22 15:50:48 +03:30
parent 22d8178c88
commit 59e4dc471f
13 changed files with 194 additions and 70 deletions
+17
View File
@@ -0,0 +1,17 @@
import Resizer from "react-image-file-resizer";
export const resizeImage = (file: File): Promise<Blob> =>
new Promise<Blob>((resolve) => {
Resizer.imageFileResizer(
file,
150, // target width
150, // target height
"JPEG", // output format
100, // quality
0, // rotation
(uri: any) => {
resolve(uri as Blob);
},
"blob" // output type
);
});