dfa1234 / ngx-image-compress

Angular library for uploading and compressing images
https://image-library.app
MIT License
86 stars 36 forks source link

File Object has to be emitted in the changeEvent like the traditional (onchange),,, to get the all file info.............. #96

Closed Vasanthvivi closed 1 year ago

Vasanthvivi commented 1 year ago

File Object has to be emitted in the changeEvent like the traditional (onchange),,, to get the all file info.............. it could be an enchancement....

dfa1234 commented 1 year ago

Sure it could be, but we saw some opportunity to simplify the external API of our service, and only return the relevant information (data-url, and file name).

What other property from the File object would be useful for your use case?

Vasanthvivi commented 1 year ago

the whole file object or atleast file name....

Vasanthvivi commented 1 year ago

similar to the file object in the input[type=file] formats....

Vasanthvivi commented 1 year ago

i hope you add and release within this week...

dfa1234 commented 1 year ago

File name you already have it. If you can explain what other properties from the object you need, that would be great.

Vasanthvivi commented 1 year ago

i didnt get the file name.. mostly if it emits the complete the file object that would be great....

Vasanthvivi commented 1 year ago

this.imageCompress.uploadAndGetImageWithMaxSize(1, true) in this method how to manually set the files.....

Vasanthvivi commented 1 year ago

@dfa1234 i mean the exact file name from the machine....

Vasanthvivi commented 1 year ago

change the label to enhancement

Vasanthvivi commented 1 year ago

hey man.... why there is no response....

Vasanthvivi commented 1 year ago

while compressing only am not getting the file name....

dfa1234 commented 1 year ago

I think you will find what you need by browsing the source code. In particular this file https://github.com/dfa1234/ngx-image-compress/blob/master/projects/ngx-image-compress/src/lib/image-compress.ts It's were all the magic happen. Feel free to adapt any "upload" method you prefer