fix: Dockerfile updated
This commit is contained in:
@@ -25,7 +25,6 @@ RUN apk add --no-cache ca-certificates tzdata
|
|||||||
COPY --from=builder /app/app .
|
COPY --from=builder /app/app .
|
||||||
COPY --from=builder /app/templates ./templates
|
COPY --from=builder /app/templates ./templates
|
||||||
COPY --from=builder /app/static ./static
|
COPY --from=builder /app/static ./static
|
||||||
COPY --from=builder /app/.env ./
|
|
||||||
|
|
||||||
RUN mkdir -p /app/uploads
|
RUN mkdir -p /app/uploads
|
||||||
|
|
||||||
|
|||||||
@@ -144,8 +144,14 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label>Max_File_Size_MB</label>
|
<label>Max_File_Size_MB</label>
|
||||||
<div>
|
<div class="flex flex-col gap-1">
|
||||||
<input type="number" min="1" name="upload_max_file_size_mb" value="{{.UploadMaxFileSizeMB}}">
|
<div class="flex gap-2 items-center">
|
||||||
|
<input id="fileSizeMB" type="number" min="1" name="upload_max_file_size_mb" value="{{.UploadMaxFileSizeMB}}">
|
||||||
|
|
||||||
|
<input id="fileSizeGB" type="text" readonly placeholder="GB"
|
||||||
|
class="w-24 bg-gray-100 cursor-not-allowed">
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="hint">Hard limit enforced by upload endpoints</div>
|
<div class="hint">Hard limit enforced by upload endpoints</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -160,8 +166,13 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label>Max_Expiry_Hours</label>
|
<label>Max_Expiry_Hours</label>
|
||||||
<div>
|
<div class="flex flex-col gap-1">
|
||||||
<input type="number" min="1" name="upload_max_hours" value="{{.UploadMaxHours}}">
|
<div class="flex gap-2 items-center">
|
||||||
|
<input id="hoursInput" type="number" min="1" name="upload_max_hours" value="{{.UploadMaxHours}}">
|
||||||
|
|
||||||
|
<input id="daysOutput" type="text" readonly placeholder="Days" class="w-24 bg-gray-100 cursor-not-allowed">
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="hint">User duration capped to this value</div>
|
<div class="hint">User duration capped to this value</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -198,7 +209,7 @@
|
|||||||
|
|
||||||
<!-- ACTIONS -->
|
<!-- ACTIONS -->
|
||||||
<div class="flex justify-between items-center border-t-8 border-black pt-4">
|
<div class="flex justify-between items-center border-t-8 border-black pt-4">
|
||||||
<button type="submit">Commit_Config</button>
|
<button type="submit">SAVE</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
@@ -209,5 +220,37 @@
|
|||||||
CHANGE_PASSWORD
|
CHANGE_PASSWORD
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function formatNumber(num) {
|
||||||
|
return parseFloat(num.toFixed(2));
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateConversions() {
|
||||||
|
const mb = parseFloat(document.getElementById('fileSizeMB')?.value);
|
||||||
|
const gbField = document.getElementById('fileSizeGB');
|
||||||
|
|
||||||
|
if (!isNaN(mb) && gbField) {
|
||||||
|
gbField.value = formatNumber(mb / 1024) + " GB";
|
||||||
|
} else if (gbField) {
|
||||||
|
gbField.value = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
const hours = parseFloat(document.getElementById('hoursInput')?.value);
|
||||||
|
const daysField = document.getElementById('daysOutput');
|
||||||
|
|
||||||
|
if (!isNaN(hours) && daysField) {
|
||||||
|
daysField.value = formatNumber(hours / 24) + " days";
|
||||||
|
} else if (daysField) {
|
||||||
|
daysField.value = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Run on load
|
||||||
|
window.addEventListener('DOMContentLoaded', updateConversions);
|
||||||
|
|
||||||
|
// Listen for changes
|
||||||
|
document.addEventListener('input', updateConversions);
|
||||||
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user