2020-03-21 13:34:37 +03:00
|
|
|
{{define "content"}}
|
2020-03-25 02:29:08 +03:00
|
|
|
<div style="text-align: center;">
|
|
|
|
<label class="upload-container" onclick="labelClicked(event)">
|
|
|
|
<div class="upload-wrapper">
|
|
|
|
<form id="upload-form" class="upload-form" enctype="multipart/form-data" method="POST" action="/upload">
|
|
|
|
<input id="video-input" type="file" accept="video/*" onchange="fileSelected()" style="display: none;"/>
|
|
|
|
<div class="upload-box">
|
|
|
|
<img width="100" src="/static/upload-icon.png"/>
|
|
|
|
<span>Click to browse or drop file here</span>
|
|
|
|
</div>
|
|
|
|
<div class="upload-details">
|
2022-11-25 05:48:06 +03:00
|
|
|
<select id="target-library-path" name="target-library-path">
|
|
|
|
{{range $index, $item :=.Config.Library}}
|
2023-01-21 03:59:14 +03:00
|
|
|
<option value="{{$item.Path}}"{{if eq $index 0}} selected{{end}}>/{{$item.Prefix}}</option>
|
2022-11-25 05:48:06 +03:00
|
|
|
{{end}}
|
|
|
|
</select>
|
2020-03-27 14:04:10 +03:00
|
|
|
<input id="video-title" type="text" placeholder="Optional title" />
|
|
|
|
<textarea id="video-description" rows="2" placeholder="Optional description"></textarea>
|
2020-03-25 02:29:08 +03:00
|
|
|
<div id="upload-file" class="upload-file">
|
|
|
|
<span id="upload-filename"></span>
|
|
|
|
<img width="20" src="/static/close-icon.png" onclick="removeFile(event)"/>
|
|
|
|
</div>
|
|
|
|
<span id="upload-message" class="upload-message">No file selected</span>
|
|
|
|
<div id="upload-button-wrapper" class="upload-button-wrapper">
|
|
|
|
<button id="upload-button" class="upload-button" onclick="startUploading()" type="button">
|
|
|
|
<span id="upload-stopped">Upload</span>
|
|
|
|
<span id="upload-started" class="loader" style="display: none;"></span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div id="upload-progress-container" class="upload-progress-container">
|
|
|
|
<div id="upload-progress" class="upload-progress">
|
|
|
|
<span id="upload-progress-label" class="upload-progress-label"></span>
|
|
|
|
</div>
|
|
|
|
<div style="flex-grow: 1;"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
2020-03-21 13:34:37 +03:00
|
|
|
</div>
|
2020-03-25 02:29:08 +03:00
|
|
|
</label>
|
2020-03-28 10:19:22 +03:00
|
|
|
<p><a href="/import">Importing a video? Click here</a></p>
|
2020-03-21 13:34:37 +03:00
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{define "scripts"}}
|
2021-06-08 16:22:14 +03:00
|
|
|
<script>window['MAX_UPLOAD_SIZE'] = '{{.Config.Server.MaxUploadSize}}';</script>
|
2020-03-21 13:34:37 +03:00
|
|
|
<script type="application/javascript" src="/static/upload.js"></script>
|
|
|
|
{{end}}
|