Permalink
Show file tree
Hide file tree
7 changes: 3 additions & 4 deletions
7
client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.ts
6 changes: 3 additions & 3 deletions
6
client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.ts
3 changes: 1 addition & 2 deletions
3
client/src/app/shared/shared-actor-image/actor-avatar.component.ts
8 changes: 3 additions & 5 deletions
8
client/src/app/shared/shared-forms/preview-upload.component.ts
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Safer image preview
- Loading branch information
1 parent
4546d92
commit 0ea2f79
Showing
6 changed files
with
24 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| function imageToDataURL (input: File | Blob) { | ||
| return new Promise<string>(res => { | ||
| const reader = new FileReader() | ||
|
|
||
| reader.onerror = err => console.error('Cannot read input file.', err) | ||
| reader.onloadend = () => res(reader.result as string) | ||
| reader.readAsDataURL(input) | ||
| }) | ||
| } | ||
|
|
||
| export { | ||
| imageToDataURL | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| export * from './users' | ||
| export * from './bytes' | ||
| export * from './images' | ||
| export * from './peertube-web-storage' | ||
| export * from './utils' | ||
| export * from './plugins-manager' |