diff --git a/public/index.html b/public/index.html
index 2f39f71..31fdb64 100644
--- a/public/index.html
+++ b/public/index.html
@@ -473,7 +473,7 @@ body::before{content:'';position:fixed;inset:0;background:radial-gradient(ellips
-
Destination Folder
+
AMPP Destination Folder
@@ -481,22 +481,7 @@ body::before{content:'';position:fixed;inset:0;background:radial-gradient(ellips
- Prefix: (root)
-
-
-
-
-
-
- AMPP Destination Folder
- — optional
-
-
-
- AMPP folder: (none — skip placement)
+ AMPP folder: (root)
@@ -831,8 +816,7 @@ let currentUser = localStorage.getItem('dw_user') || null;
let currentRole = localStorage.getItem('dw_role') || null;
let uploadMode = 'http';
let selectedPrefix = '';
-let selectedAmppFolderId = '';
-let selectedAmppFolderName = '';
+
let amppFolderCache = [];
let folderTree = [];
let selectedFiles = [];
@@ -1083,16 +1067,6 @@ async function deleteFolder(pathArr) {
} catch(e) { showToast(e.message,'error'); }
}
-// ============================================================
-// AMPP FOLDER PICKER
-// ============================================================
-function updateAmppFolderFromInput(val) {
- selectedAmppFolderName = val.trim();
- selectedAmppFolderId = '';
- var el = document.getElementById('ampp-folder-display');
- if (el) el.textContent = selectedAmppFolderName || '(none — skip placement)';
-}
-
// ============================================================
// FILE HANDLING
// ============================================================
@@ -1251,7 +1225,7 @@ async function uploadFilePresigned(item, idx) {
setFileStatus(idx, 'uploading', 'Getting URL\u2026');
const pre = await api('POST', '/api/presigned', {
filename: item.name, prefix: selectedPrefix, contentType: mime, size: item.file.size,
- amppFolderId: selectedAmppFolderId, amppFolderName: selectedAmppFolderName,
+ amppFolderName: selectedPrefix,
});
if (!pre.success) throw new Error(pre.error || 'Failed to get presigned URL');
return new Promise((resolve, reject) => {
@@ -1266,7 +1240,7 @@ async function uploadFilePresigned(item, idx) {
});
xhr.addEventListener('load', async () => {
if (xhr.status >= 200 && xhr.status < 300) {
- try { await api('POST', '/api/presigned/complete', { key: pre.key, size: item.file.size, filename: item.name, amppFolderId: selectedAmppFolderId, amppFolderName: selectedAmppFolderName }); } catch(_) {}
+ try { await api('POST', '/api/presigned/complete', { key: pre.key, size: item.file.size, filename: item.name, amppFolderName: selectedPrefix }); } catch(_) {}
resolve({ key: pre.key });
} else {
reject(new Error(`S3 returned ${xhr.status}: ${xhr.statusText}`));
@@ -1341,7 +1315,7 @@ async function uploadFilePresigned(item, idx) {
setFileStatus(idx, 'uploading', '100%');
// Notify server for quota tracking + queue AMPP placement
- try { await api('POST', '/api/presigned/complete', { key, size: item.file.size, filename: item.name, amppFolderId: selectedAmppFolderId, amppFolderName: selectedAmppFolderName }); } catch(_) {}
+ try { await api('POST', '/api/presigned/complete', { key, size: item.file.size, filename: item.name, amppFolderName: selectedPrefix }); } catch(_) {}
return { key };
}