s3-angular-file-upload icon indicating copy to clipboard operation
s3-angular-file-upload copied to clipboard

Ngf-resize: original file is uploaded

Open kriebb opened this issue 9 years ago • 0 comments

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..

kriebb avatar Dec 09 '15 12:12 kriebb