summaryrefslogtreecommitdiff
path: root/static/upload.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/upload.js')
-rw-r--r--static/upload.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/static/upload.js b/static/upload.js
index b65684e..457f01e 100644
--- a/static/upload.js
+++ b/static/upload.js
@@ -12,6 +12,8 @@ let file = null
const uploadForm = document.getElementById('upload-form')
const videoInput = document.getElementById('video-input')
+const videoTitle = document.getElementById('video-title')
+const videoDescription = document.getElementById('video-description')
const uploadMessageLabel = document.getElementById('upload-message')
const uploadFileContainer = document.getElementById('upload-file')
const uploadFilenameLabel = document.getElementById('upload-filename')
@@ -161,6 +163,8 @@ const startUploading = () => {
const formData = new FormData()
formData.append('video_file', file)
+ formData.append('video_title', videoTitle.value)
+ formData.append('video_description', videoDescription.value)
const xhr = new XMLHttpRequest()
xhr.upload.addEventListener('progress', uploadProgress, false)
@@ -236,4 +240,4 @@ const uploadAbort = () => { // upload abort
setMessage('The upload has been canceled by the user or the browser dropped the connection.', true)
setProgress(0)
setUploadState(false)
-} \ No newline at end of file
+}