- src = value /image/audio/video/file / please don't change the default type / if need change, please see connett_tools/action_view/helpers/tags/qiniu_upload_field.rb - type ||= 'image' div class="ui-upload #{value.blank? ? '' : 'uploaded'} file-#{name}" data-type="#{type}" data-value="#{src}" div class="ui-type-#{type} ui-upload-type" div.ui-upload-tag.ui-wrap - case type - when 'image' span.glyphicon.glyphicon-picture - when 'avatar' span.glyphicon.glyphicon-user - when 'audio' span.glyphicon.glyphicon-music - when 'video' span.glyphicon.glyphicon-facetime-video - when 'file' span.glyphicon.glyphicon-file div.ui-upload-progress.ui-wrap div.ui-upload-preview.ui-wrap div.ui-upload-file.ui-wrap input type="hidden" value="#{value}" name="#{name}" input.file data-form-data="#{form_data}" data-name="#{name}" title="" data-url="#{url}" name="file" id="qiniu-#{uuid}" type="file" data-download-host=download_host data-url-value=url_value div.ui-upload-close span.glyphicon.glyphicon-remove