Skip to content

Commit

Permalink
Merge branch 'main' into openshift-vars
Browse files Browse the repository at this point in the history
  • Loading branch information
vmanawat committed Feb 27, 2025
2 parents 2823ad5 + f956769 commit 20ba3f9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
5 changes: 0 additions & 5 deletions backend/src/cron-job/cron-job.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -602,11 +602,6 @@ export class CronJobService {
}

async processFiles(files) {
// if (this.operationLockService.getCurrentLock() == "FILE_PROCESSING") {
// this.logger.log("Skipping cron procedure of file processing: Already processing files.");
// return;
// }

this.logger.log("Starting to process queued files...");

try{
Expand Down
22 changes: 17 additions & 5 deletions frontend/src/pages/FileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,16 @@ import {
ListItem,
ListItemText,
Typography,
CircularProgress,
Dialog,
DialogTitle,
DialogContent,
DialogActions,
} from "@mui/material";
import React, { useState } from "react";
import { useState } from "react";
import { FileUploader } from "react-drag-drop-files";
import {
DeleteRounded,
UploadFile,
CheckCircle,
Error,
ExpandMore,
ChevronRight,
} from "@mui/icons-material";
Expand Down Expand Up @@ -52,6 +49,21 @@ function FileUpload() {
};

const handleFileSelect = (files) => {
if (!files) return;

const selectedFilesForValidation = Array.from(files);
const invalidFiles = selectedFilesForValidation.filter((file: any) =>
file.name.includes(" "),
);

if (invalidFiles.length > 0) {
confirm(
"File names cannot contain spaces. Please rename the following files and try again:\n" +
invalidFiles.map((file: any) => file.name).join("\n"),
);
return;
}

setFiles(files);
selectedFiles = Array.from(files);

Expand Down Expand Up @@ -180,7 +192,7 @@ function FileUpload() {
};

const fileSizeError = () => {
confirm("File size error \n TODO");
confirm("File size error \nFile cannot be larger than 10MB.");
};

return (
Expand Down

0 comments on commit 20ba3f9

Please sign in to comment.