46 lines
2.8 KiB
HTML
46 lines
2.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>Upload a Video - Sanctuary Commander</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
|
<script src="{{ url_for('static', filename='upload_media.js') }}" defer></script>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1 class="text-center">Upload a Video</h1>
|
|
<hr>
|
|
<a class="btn btn-secondary mb-3" href="{{ url_for('home.root_route') }}">Home</a>
|
|
<div class="alert alert-warning" role="note">
|
|
Do not leave this page, refresh, or close the browser until the upload is complete.
|
|
You will automatically return to the homepage when the video has been saved.
|
|
</div>
|
|
<p>Upload one video, up to 5GB ({{ max_video_size }} bytes). Large uploads may take several minutes.</p>
|
|
<noscript><div class="alert alert-danger">JavaScript must be enabled to upload videos and show progress.</div></noscript>
|
|
<div id="uploadError" class="alert alert-danger" role="alert" hidden></div>
|
|
<form id="videoUploadForm" action="{{ url_for('upload_video.get_page') }}" method="POST" enctype="multipart/form-data"
|
|
data-media-upload data-media-kind="video" data-limit-label="5GB"
|
|
data-max-size="{{ max_video_size }}" data-home-url="{{ url_for('home.root_route') }}">
|
|
<fieldset id="uploadFields">
|
|
<div class="mb-3">
|
|
<label class="form-label" for="videoName">Video Name</label>
|
|
<input class="form-control" type="text" id="videoName" name="name" maxlength="120" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label class="form-label" for="videoFile">Video File</label>
|
|
<input class="form-control" type="file" id="videoFile" name="files[]"
|
|
accept=".mp4,.m4v,.mkv,.mov,.webm,.avi,.wmv,.mpeg,.mpg,.ts,.mts,.m2ts,.3gp,.ogv" required>
|
|
</div>
|
|
<button class="btn btn-primary mb-3" type="submit">Upload Video</button>
|
|
</fieldset>
|
|
</form>
|
|
<div id="uploadProgress" class="progress mb-2" role="progressbar" aria-label="Video upload progress"
|
|
aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">
|
|
<div id="uploadProgressBar" class="progress-bar" style="width: 0%">0%</div>
|
|
</div>
|
|
<p id="uploadStatus" role="status" aria-live="polite">Ready to upload.</p>
|
|
</div>
|
|
</body>
|
|
</html>
|