summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorHeinrich 'Henrik' Langos <gumbo2000@noreply@mills.io>2022-11-25 02:48:06 +0000
committerJames Mills <james@mills.io>2022-11-25 02:48:06 +0000
commit0a793f7d3fed115cdd242371490009db340deb00 (patch)
tree38b38ca038bc468be165673c49a1ecb3937f77ed /static
parent7a4ef5b6dfe804213d5cc1563f17deeb10e25455 (diff)
feat: Make upload path selectable (#39)
This works for me, but for a more public site, I think I'll also add a boolean attribute named "upload_allowed" and "writable" to Config.Library.. Something to allow you to configure which directories can receive new uploads, and which directories we consider writable for other purposes (like editing meta data in yml, creating new thumbnails, ...) Co-authored-by: Heinrich Langos <gumbo2000@noreply@mills.io> Reviewed-on: https://git.mills.io/prologic/tube/pulls/39 Co-authored-by: Heinrich 'Henrik' Langos <gumbo2000@noreply@mills.io> Co-committed-by: Heinrich 'Henrik' Langos <gumbo2000@noreply@mills.io>
Diffstat (limited to 'static')
-rw-r--r--static/upload.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/static/upload.js b/static/upload.js
index f4da351..965f2ed 100644
--- a/static/upload.js
+++ b/static/upload.js
@@ -13,6 +13,7 @@ let file = null
const uploadForm = document.getElementById('upload-form')
const videoInput = document.getElementById('video-input')
+const targetLibraryPath = document.getElementById('target-library-path')
const videoTitle = document.getElementById('video-title')
const videoDescription = document.getElementById('video-description')
const uploadMessageLabel = document.getElementById('upload-message')
@@ -164,6 +165,7 @@ const startUploading = () => {
const formData = new FormData()
formData.append('video_file', file)
+ formData.append('target_library_path', targetLibraryPath.value)
formData.append('video_title', videoTitle.value)
formData.append('video_description', videoDescription.value)
const xhr = new XMLHttpRequest()