Comments (4)
Hello,
onUpload
is triggered when actual upload happens.
There is another output onStatusChange
which I guess is what you want. Then in your component you can check for status Selected
and get data url from referenced FancyImageUploaderComponent
object:
@ViewChild(FancyImageUploaderComponent) imageUploader: FancyImageUploaderComponent;
imageUploaderStatusChanged(status: Status) {
if (status === Status.Selected) {
let dataUrl = imageUploader.imageThumbnail;
}
}
I haven't tried this sample so not sure if that will work.
from ng2-fancy-image-uploader.
(onStatusChange)="imageUploaderStatusChanged($event)"
The above solution works.
from ng2-fancy-image-uploader.
Now the question arise how to invoke upload when autoUpload is false?
from ng2-fancy-image-uploader.
Declare a variable for the component and call upload():
<fancy-image-uploader
#imageUploader
[options]="options">
</fancy-image-uploader>
<button type="button" (click)="imageUploader.upload()">Upload</button>
from ng2-fancy-image-uploader.
Related Issues (20)
- cropperjs: module not found HOT 7
- Unexpected value 'FancyImageUploaderModule' imported by the module 'AppModuleShared'. Please add a @NgModule annotation
- ThumbnailResizeMode required my FancyImageUploaderOptions
- Image Cropping
- Version issue HOT 1
- How to sent headers in upload URL
- Display initial image HOT 7
- How show initial image ? HOT 1
- No Provider for Renderer HOT 1
- Documentation for options
- Support Angular 6 HOT 5
- Default image HOT 2
- unable to take production build
- Installation error HOT 1
- Styles missing? HOT 1
- Metadata version mismatch for module - found version 4, expected 3 HOT 1
- BrowserModule has already been loaded (on lazy load module) HOT 1
- BrowserModule was be imported HOT 1
- Critical dependency: the request of a dependency is an expression HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng2-fancy-image-uploader.