2017-02-27 07:44:15 +03:00
|
|
|
|
|
|
|
{{#if url}}
|
|
|
|
<img src="{{url}}" />
|
|
|
|
{{else if file}}
|
|
|
|
{{!-- Upload in progress! --}}
|
|
|
|
{{#if failureMessage}}
|
|
|
|
<div class="failed">{{failureMessage}}</div>
|
|
|
|
{{/if}}
|
|
|
|
<div class="progress-container">
|
|
|
|
<div class="progress">
|
|
|
|
<div class="bar {{if failureMessage "fail"}}" style={{progressStyle}}></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{#if failureMessage}}
|
|
|
|
<button class="btn btn-green" {{action "reset"}}>Try Again</button>
|
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
|
|
|
{{!-- file selection/drag-n-drop --}}
|
2017-03-03 11:59:01 +03:00
|
|
|
<div class="upload-form">
|
|
|
|
{{#gh-file-input multiple=false alt=description action=(action 'fileSelected') accept=accept}}
|
|
|
|
<div class="description">{{description}}</div>
|
|
|
|
{{/gh-file-input}}
|
|
|
|
</div>
|
2017-02-27 07:44:15 +03:00
|
|
|
{{/if}}
|