Work to add Youtube downloads, video and image uploads, and the player script
This commit is contained in:
1 parent
a3f55a8c35
commit
92d6473e1d
15 files changed
+1047
-79
No files matched your search
@@ -1,42 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Video Commander</title>
|
||||
<title>Upload a Static Image - 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">
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../static/style.css">
|
||||
<script src="../static/script.js"></script>
|
||||
<script>
|
||||
function prepUpload() {
|
||||
uploadFiles('submit', 'fileToUpload', 'progressContainer', 'progress', '/upload/photo', {
|
||||
'name': document.getElementById('buttonName').value
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<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 Static Photo</h1>
|
||||
<h1 class="text-center">Upload a Static Image</h1>
|
||||
<hr>
|
||||
<div class="alert alert-info text-center" role="alert">
|
||||
Upload a single static photo, single photos are good if you want something that doesn't distract during services.
|
||||
<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 image has been saved.
|
||||
</div>
|
||||
<form>
|
||||
<div id="progressContainer" class="progress" role="progressbar", aria-label="Upload Progress" aria-valuemin="0"
|
||||
aria-valuemin="0", aria-valuemax="100" >
|
||||
<div id="progress" class="progress-bar" style="width: 0%;">0%</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="fileToUpload">File to Upload</label>
|
||||
<input type="file" class="form-control" name="file" id="fileToUpload" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="buttonName">Button Name</label>
|
||||
<input type="text" class="form-control" name="buttonName" id="buttonName" />
|
||||
</div>
|
||||
<button id="submit" class="btn btn-primary form-control" onclick="prepUpload()">Submit</button>
|
||||
<p>Upload one image, up to 100MB ({{ max_image_size }} bytes).</p>
|
||||
<noscript><div class="alert alert-danger">JavaScript must be enabled to upload images and show progress.</div></noscript>
|
||||
<div id="uploadError" class="alert alert-danger" role="alert" hidden></div>
|
||||
<form id="imageUploadForm" action="{{ url_for('upload_photo.get_page') }}" method="POST" enctype="multipart/form-data"
|
||||
data-media-upload data-media-kind="image" data-limit-label="100MB"
|
||||
data-max-size="{{ max_image_size }}" data-home-url="{{ url_for('home.root_route') }}">
|
||||
<fieldset id="uploadFields">
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="imageName">Image Name</label>
|
||||
<input class="form-control" type="text" id="imageName" name="name" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="imageFile">Image File</label>
|
||||
<input class="form-control" type="file" id="imageFile" name="files[]"
|
||||
accept=".jpg,.jpeg,.png,.webp,.bmp,.tif,.tiff,.gif" required>
|
||||
</div>
|
||||
<button class="btn btn-primary mb-3" type="submit">Upload Image</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
<div id="uploadProgress" class="progress mb-2" role="progressbar" aria-label="Image 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>
|
||||
</html>
|
||||
Reference in new issue
Block a user