更新 file-share-frontend/script.js

This commit is contained in:
2025-05-27 13:23:19 +08:00
parent 8727785289
commit b6bac2389f

View File

@@ -26,7 +26,7 @@ document.addEventListener('DOMContentLoaded', function() {
} }
try { try {
const response = await fetch('https://share.ssplus.cn/upload', { const response = await fetch('<你的后端地址>/upload', {
method: 'POST', method: 'POST',
body: formData body: formData
}); });
@@ -77,7 +77,7 @@ document.addEventListener('DOMContentLoaded', function() {
} }
// 构建下载URL // 构建下载URL
let downloadUrl = `https://share.ssplus.cn/file/${fileId}`; let downloadUrl = `<你的后端地址>/file/${fileId}`;
if (password) { if (password) {
downloadUrl += `?password=${encodeURIComponent(password)}`; downloadUrl += `?password=${encodeURIComponent(password)}`;
} }