Files
SqlDatabaseVectorSearch/SqlDatabaseVectorSearch/wwwroot/js/functions.js
T
Marco Minerva a0d1126d15 Enhance file upload and notification features
- Updated `Documents.razor` to change form submission handler to `UploadFile` and added `id` to `InputFile`.
- Implemented `UploadFile` method to handle file uploads and reset input after successful upload.
- Upgraded package references in `SqlDatabaseVectorSearch.csproj` for `Microsoft.SemanticKernel` and `Swashbuckle.AspNetCore.SwaggerUI`.
- Introduced `resetFileInput` function in `functions.js` to clear file input selections.
2025-03-19 10:38:42 +01:00

19 lines
370 B
JavaScript

window.setFocus = (element) => {
if (element) {
element.focus();
}
};
window.scrollTo = (element) => {
if (element) {
element.scrollIntoView();
}
}
window.resetFileInput = (elementId) => {
document.getElementById(elementId).value = '';
};
function getLocalTime(utcDateTime) {
return new Date(utcDateTime).toLocaleString();
}