Skip to content

Commit

Permalink
Added code to set filepath
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolf-castelino committed Feb 10, 2025
1 parent 433c250 commit bb373cc
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,12 @@ function UploadFilesForm(props: UploadFilesProps): JSX.Element {
fileName: file.name,
fileSizeBytes: Math.max(file.size, 1),
status: UploadStatus.progress,
relativePath: file.relativePath,
relativePath: props.filePath != '/' ? props.filePath : file.relativePath,
uploadPercentage: '0',
})),
]);

console.log(' uploadedFiles : ', uploadedFiles);
let position = 0;
while (position < selectedFiles.length) {
const itemsForBatch = selectedFiles.slice(position, position + MAX_PARALLEL_UPLOADS);
Expand Down Expand Up @@ -364,7 +365,9 @@ function UploadFilesForm(props: UploadFilesProps): JSX.Element {
/>
</FormField>
<FileUpload
onChange={(files: FileWithPath[]) => setSelectedFiles(files)}
onChange={(files: FileWithPath[]) => {
setSelectedFiles(files);
}}
value={selectedFiles}
disabled={uploadInProgress}
/>
Expand Down

0 comments on commit bb373cc

Please sign in to comment.