Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -704,7 +704,7 @@ HTML_CONTENT = """
|
|
704 |
function saveToHistory(fileName, url) {
|
705 |
let history = JSON.parse(localStorage.getItem('uploadHistory')) || [];
|
706 |
history.unshift({ fileName, url, timestamp: new Date().toISOString() });
|
707 |
-
if (history.length >
|
708 |
localStorage.setItem('uploadHistory', JSON.stringify(history));
|
709 |
}
|
710 |
|
|
|
704 |
function saveToHistory(fileName, url) {
|
705 |
let history = JSON.parse(localStorage.getItem('uploadHistory')) || [];
|
706 |
history.unshift({ fileName, url, timestamp: new Date().toISOString() });
|
707 |
+
if (history.length > 500) history = history.slice(0, 500);
|
708 |
localStorage.setItem('uploadHistory', JSON.stringify(history));
|
709 |
}
|
710 |
|