2015-09-30 48 views
0

使用Uploadcare小部件上傳圖像後,如何隱藏選擇按鈕並在上傳圖像時顯示刪除按鈕?如何隱藏從Uploadcare小部件中選擇文件按鈕

<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> 
+4

你需要發佈最少的代碼,以顯示你最近在做什麼.. –

+0

'

<%= image_tag resource.picture.present? ? resource.picture.url : "/assets/profile_blank-4844b32a08e9c5effe4be4f143d9c41f.png", id: "user_profile_pic", class: "center-block img-circle img-responsive"%>
' 能夠上傳和檢索,但我需要顯示選擇文件按鈕,只有當圖像沒有上傳 – Rathishkumar

回答

0

你想添加clearable選項到小部件顯示「刪除」按鈕。

如果上傳文件,「選擇」按鈕應該已經隱藏了,不是嗎?

相關問題