This repository has been archived by the owner on Mar 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compressing multiple files jpg and png working
- Loading branch information
clouless
committed
Dec 29, 2018
1 parent
007ac7b
commit 81ba6be
Showing
9 changed files
with
164 additions
and
80 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Pipe, PipeTransform } from '@angular/core'; | ||
import { formatNumber } from '@angular/common'; | ||
|
||
|
||
@Pipe({ name: 'fileSize', pure: false }) | ||
export class FileSizePipe implements PipeTransform { | ||
transform(size: number) { | ||
const sizeInMegaBytes = size / 1024 / 1024; | ||
const formattedSize = formatNumber(sizeInMegaBytes, 'en_US', '.3'); | ||
return `${formattedSize} MB`; | ||
} | ||
} |
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
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 |
---|---|---|
|
@@ -112,15 +112,6 @@ | |
"@angular-devkit/core" "7.0.7" | ||
rxjs "6.3.3" | ||
|
||
"@angular/[email protected]": | ||
version "7.0.0" | ||
resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-7.0.0.tgz#b98d7378e84fed1af30c460aa91af4ada2cf252b" | ||
integrity sha512-HX+gIJzST/Nu07ASg1XR583KSEmHI6kUbiSBdq0LqF3mIQgId5z3auBqQcXAgvB0Cg29+/38aj31hnoK/LswEQ== | ||
dependencies: | ||
tslib "^1.7.1" | ||
optionalDependencies: | ||
parse5 "^5.0.0" | ||
|
||
"@angular/cli@~7.0.4": | ||
version "7.0.7" | ||
resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-7.0.7.tgz#0f4500c5fcf22694c9c40f14d2a5b3dc90fbb4a3" | ||
|
@@ -303,6 +294,13 @@ | |
lodash "^4.17.10" | ||
to-fast-properties "^2.0.0" | ||
|
||
"@cloukit/icon@^7.0.0": | ||
version "7.0.0" | ||
resolved "https://registry.yarnpkg.com/@cloukit/icon/-/icon-7.0.0.tgz#675403d276e817ad5130cac97c360f1952c11647" | ||
integrity sha512-FSrEQwFO1miDOQDT+pneadpa0U0hQAZ26q1dyEW7EjWN0+MDcqpUsABCJyS7ojp519VJuuPxV4FyDMJGLr4jmQ== | ||
dependencies: | ||
tslib "^1.9.0" | ||
|
||
"@ngtools/[email protected]": | ||
version "7.0.7" | ||
resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-7.0.7.tgz#0cd933534a878f25f69448435302c82a861096a6" | ||
|
@@ -5131,11 +5129,6 @@ [email protected]: | |
resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" | ||
integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== | ||
|
||
parse5@^5.0.0: | ||
version "5.1.0" | ||
resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.0.tgz#c59341c9723f414c452975564c7c00a68d58acd2" | ||
integrity sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ== | ||
|
||
[email protected]: | ||
version "0.0.5" | ||
resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d" | ||
|
@@ -6897,7 +6890,7 @@ tsickle@>=0.29.0: | |
mkdirp "^0.5.1" | ||
source-map "^0.7.3" | ||
|
||
tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: | ||
tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: | ||
version "1.9.3" | ||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" | ||
integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== | ||
|