Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to preview the file #112

Open
yogendrakarekar opened this issue Dec 14, 2017 · 1 comment
Open

How to preview the file #112

yogendrakarekar opened this issue Dec 14, 2017 · 1 comment

Comments

@yogendrakarekar
Copy link

The plugin should also return a data url with which we can preview the file in browser

@adonespitogo
Copy link
Owner

adonespitogo commented Dec 20, 2017

the format to preview image is :
data:[image/type];base64,[base64 string]

example:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAG.....

These info are all available in the plugin

To use it in browser:

<img ng-src ="data:{{model.filetype}};base64,{{model.base64}}" >

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants