aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/root-helpers/images.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-07-15 15:30:14 +0200
committerChocobozzz <me@florianbigard.com>2022-07-18 11:37:18 +0200
commit42b40636991b97fe818007fab19091764fc5db73 (patch)
treedb431787c06ce898d22e91ff771f795219274fc6 /client/src/root-helpers/images.ts
parent654d4ede7fa4d0faa71e49bcfab6b65a686397b2 (diff)
downloadPeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.gz
PeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.zst
PeerTube-42b40636991b97fe818007fab19091764fc5db73.zip
Add ability for client to create server logs
Diffstat (limited to 'client/src/root-helpers/images.ts')
-rw-r--r--client/src/root-helpers/images.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/root-helpers/images.ts b/client/src/root-helpers/images.ts
index fb229ce6d..c4b09ec3c 100644
--- a/client/src/root-helpers/images.ts
+++ b/client/src/root-helpers/images.ts
@@ -1,8 +1,10 @@
1import { logger } from './logger'
2
1function imageToDataURL (input: File | Blob) { 3function imageToDataURL (input: File | Blob) {
2 return new Promise<string>(res => { 4 return new Promise<string>(res => {
3 const reader = new FileReader() 5 const reader = new FileReader()
4 6
5 reader.onerror = err => console.error('Cannot read input file.', err) 7 reader.onerror = err => logger.error('Cannot read input file.', err)
6 reader.onloadend = () => res(reader.result as string) 8 reader.onloadend = () => res(reader.result as string)
7 reader.readAsDataURL(input) 9 reader.readAsDataURL(input)
8 }) 10 })