0

Once the image is uploaded using Uploadcare widget, how to hide the choose button and show remove button if an image is uploaded?

<div id="profile_edit_img"> 
    <%= image_tag resource.picture.present? ? resource.picture.url : "/assets/profile_blank-4844b32a08e9c5effe4be4f143d9c41f.png", id: "user_profile_pic", class: "center-block img-circle img-responsive"%> 
</div>
Dmitry Mukhin
  • 6,649
  • 3
  • 29
  • 31
Rathishkumar
  • 119
  • 2
  • 10
  • 4
    You need to post minimal code to show what are you upto.. – Guruprasad J Rao Sep 30 '15 at 05:16
  • '
    <%= image_tag resource.picture.present? ? resource.picture.url : "/assets/profile_blank-4844b32a08e9c5effe4be4f143d9c41f.png", id: "user_profile_pic", class: "center-block img-circle img-responsive"%>
    ' Am able to upload and retrieve but i need to show choose file button only when image is not uploaded
    – Rathishkumar Sep 30 '15 at 09:16

1 Answers1

1

You want to add clearable option to the widget to show "Remove" button.

The "Choose" button should be already hidden if a file is uploaded, isn't it so?

Dmitry Mukhin
  • 6,649
  • 3
  • 29
  • 31