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

Ngf-resize: original file is uploaded #19

Open
kriebb opened this issue Dec 9, 2015 · 0 comments
Open

Ngf-resize: original file is uploaded #19

kriebb opened this issue Dec 9, 2015 · 0 comments

Comments

@kriebb
Copy link

kriebb commented Dec 9, 2015

I don't manage to upload the resized image (not using crop)

in the html file:

In the controller

var config = {
url: myURI + this.$scope.model.id,
fileName: image.name,
file: image,
method: "POST"
}
return this.Upload.upload(config)...

Even if I do:

var config = {
url: myURI + this.$scope.model.id,
fileName: image.name,
file: image,
method: "POST"
}
return this.Upload.upload(config)

When selecting the image. The method does get called:
upload.dataUrltoBlob

When I hover, the blob url in my source code, "src="blob:http%3A//localhost%3A61392/ada6bba5-7dbc-41e9-a00e-76c252b7086c" , I do get : "original image = 640x428" . So that's good (image on disk is a lot bigger)

But when I try to upload it, no go.

when image.$ngfDataUrl is like this: : "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4QCYRXhpZgAASUkqAAgAAAACADEBAgAHAAAAJgAAAGmHBAABAAAALgAAAAAAAABHb29nbGUAAAMAAJAHAAQAAAAwMjIwCZAH..."
var config = {
url: myURI + this.$scope.model.id,
fileName: upload.dataUrltoBlob(image.$ngfDataUrl, image.name),
file: image,
method: "POST"
}
return this.Upload.upload(config)

The above also does not work.

On the internet, I found some stuff about the imgcropper, but not on imageresizer..

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

1 participant