{% set targetType = targetType|default('course-activity') %}
{% set token = uploader_token(targetType, courseId, 'private') %}
{% set storageSetting = setting('storage') %}
<div class="uploader-content">
  <div class="uploader-container" id="uploader-container"
  data-init-url="{{ url('uploader_init_v2', {token: token}, true) }}"
  data-finish-url="{{ url('uploader_finished_v2', {token: token}, true) }}"
  data-accept="{{ uploader_accept(targetType, fileType|default(''))|json_encode }}"
  data-process="{{ uploader_process(targetType) }}">
  </div>
  {% if mediaType|default(null) == 'video' and setting('storage.upload_mode', 'local') != 'local' %}
    <div class="uploader-bottom">
      <div class="row">
        <div class="col-xs-8">
          转码画质
          <select class="form-control border-gray mrl js-upload-params" name="videoQuality">
            {{ select_options({'low':'流畅', 'normal':'标准', 'high':'精细'}, setting('storage.video_quality')) }}
          </select>
          转码音质
          <select class="form-control border-gray js-upload-params" name="audioQuality">
            {{ select_options({'low':'流畅', 'normal':'标准', 'high':'高品'}, setting('storage.video_audio_quality')) }}
          </select>
        </div>
        <input type="hidden" name="support_mobile" value="{{ setting('storage.support_mobile', 0) }}" />
        <div class="col-xs-4 text-xs text-center">
          <a class="btn-gray" href="javascript:;" data-container="body" data-toggle="popover" data-placement="top" data-trigger="hover" data-content="上传后将会自动转码成兼容性更好的格式，以便学员观看，建议您在转码完成后再发布相应的课时。">什么是转码</a>
          ｜
          <a class="btn-gray" href="javascript:;" data-container="body" data-toggle="popover" data-trigger="hover" data-placement="top" data-content="支持mp4, avi, flv, wmv, mov, m4v格式的视频文件上传，文件大小不能超过2GB。<br/>支持断点续传（仅在Chrome、IE9及以上等支持HTML5的浏览器中可用）。">上传说明</a>
        </div>
      </div>
    </div>
  {% endif %}

  {% if mediaType|default(null) == 'audio' and setting('storage.upload_mode', 'local') != 'local'  %}
    <div class="uploader-bottom text-right">
      <a class="btn-gray" href="javascript:;" data-container="body" data-toggle="popover" data-trigger="hover" data-placement="top" data-content="支持mp3格式的音频文件上传，且文件大小不能超过 500M 。</br>支持断点续传（仅支持HTML5浏览器）。</br>
      音频将上传到云服务器">上传说明
    </a>
    </div>
  {% endif %}
  
  {% if mediaType|default(null) == 'flash' and setting('storage.upload_mode', 'local') != 'local'  %}
    <div class="uploader-bottom text-right">
      <a class="btn-gray" href="javascript:;" data-container="body" data-toggle="popover" data-trigger="hover" data-placement="top" data-content="支持swf格式的文件上传，且文件大小不能超过 100 MB。<br/>  
      Flash将上传到云服务器">上传说明
    </a>
    </div>
  {% endif %}

  {% if mediaType|default(null) == 'document' and setting('storage.upload_mode', 'local') != 'local'  %}
    <div class="uploader-bottom text-right">
      <a class="btn-gray" href="javascript:;" data-container="body" data-toggle="popover" data-trigger="hover" data-placement="top" data-content="支持pdf,doc,docx,xls,xlsx格式的文档上传，且文件大小不能超过 100 MB。<br/>文档将上传到云服务器">上传说明
    </a>
    </div>
  {% endif %}

  {% if mediaType|default(null) == 'ppt' and setting('storage.upload_mode', 'local') != 'local'  %}
    <div class="uploader-bottom text-right">
      <a class="btn-gray" href="javascript:;" data-container="body" data-toggle="popover" data-trigger="hover" data-placement="top" data-content="支持ppt, pptx格式的PPT文件上传，且文件大小不能超过100 MB。<br/>PPT将上传到云服务器">上传说明</a>
    </div>
  {% endif %}

</div>