ng2-image-upload icon indicating copy to clipboard operation
ng2-image-upload copied to clipboard

How to add caption to the image

Open henleywc opened this issue 8 years ago • 2 comments

As the title above, I would like to add caption to each images uploaded like (image 1, image 2, etc..). I had tried to modify at "image-upload-component.js" but after i build and published it seems like the changes didn't apply. Thanks in advance,

henleywc avatar Nov 17 '17 04:11 henleywc

As the title above, I would like to add caption to each images uploaded like (image 1, image 2, etc..). I had tried to modify at "image-upload-component.js" but after i build and published it seems like the changes didn't apply. Thanks in advance,

The folder node_modules will be initiated after building your application, so the file 'image-upload-component.js', that's why your changes didn't apply,,

AminUNer avatar Jun 25 '19 14:06 AminUNer

I really appreciate the effort you made @aberezkin and i'm really looking back for solution/update in order to add caption to each image, i think the easiest way is to use a new field 'caption' and update the image-upload-component.js file. [uploadedFiles]="[{'fileName': 'fileName.jpg', url: 'http://example.com/path/to/my/file'}]" ==> [uploadedFiles]="[{'fileName': 'fileName.jpg', url: 'http://example.com/path/to/my/file', caption: 'mycaption'}]"

AminUNer avatar Jun 25 '19 14:06 AminUNer