Skip to content

Commit 5fb4626

Browse files
Update URLScan.ts
s3 url fix
1 parent 7860c08 commit 5fb4626

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

frontend/src/services/URLScan.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ const urlScanAPI = async (props: ScanProps) => {
66
try {
77
const formData = new FormData();
88
let s3url: string = '';
9-
if (props.source_type === 's3 bucket' && !props.urlParam?.endsWith('/')) {
10-
s3url = props?.urlParam + '/';
9+
if (props.source_type === 's3 bucket') {
10+
if (!props.urlParam?.endsWith('/')) {
11+
s3url = props?.urlParam + '/';
12+
} else {
13+
s3url = props?.urlParam
14+
}
1115
}
1216
formData.append('uri', props?.userCredentials?.uri ?? '');
1317
formData.append('database', props?.userCredentials?.database ?? '');

0 commit comments

Comments
 (0)