10 Commits

Author SHA1 Message Date
77e506ea4c Merge pull request 'development' (#48) from development into main
Reviewed-on: #48
2025-12-16 15:24:58 +01:00
810b020d7d Merge pull request 'b999_chrome_file_upload' (#47) from b999_chrome_file_upload into development
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit looks good
Reviewed-on: #47
2025-12-16 13:24:37 +01:00
5be89f83fd add .GLD file verification for drag and drop 2025-12-16 13:20:18 +01:00
2a7783004a fix chrome issue: selecting the same file does not work properly 2025-12-16 12:54:28 +01:00
6f9b386c18 Merge pull request 'implement drag and drop feature' (#46) from f120_drag_and_drop into development
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit looks good
Reviewed-on: #46
2025-12-16 09:43:49 +01:00
b4d9824942 implement drag and drop feature 2025-12-16 09:23:22 +01:00
776cc7a1f0 Merge pull request 'fix file upload for Chrome' (#45) from b119_model_upload_chrome into development
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit looks good
Reviewed-on: #45
2025-12-15 12:19:11 +01:00
eaa75833df fix file upload for Chrome 2025-12-15 12:18:00 +01:00
30d457f562 Merge pull request 'sync dev with main' (#44) from main into development
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit looks good
Reviewed-on: #44
2025-12-15 10:43:14 +01:00
titver968
c1dd9092ea config_prod und dev auf s3 minio 2025-12-10 14:37:03 +01:00
4 changed files with 78 additions and 54 deletions

View File

@@ -1,22 +1,17 @@
{
"minio": {
"endPoint": "api-s3.innovation-hub-niedersachsen.de",
"port": 443,
"accessKey": "AbCdEfGhIjKlMnOpQrSt",
"secretKey": "UvWxYz1234567890AbCdEfGhIjKlMnOpQrStUvWx"
},
"jwt": {
"secret": "@S2!q@@wXz$dCQ8JoVsHLpzaJ6JCfB",
"expiresIn": 3600
},
"auth": {
"admin": {
"password": "A-InnoHUB_2025!",
"admin": true
},
"user": {
"password": "U-InnoHUB_2025!",
"admin": false
}
}
}
"minio": {
"endPoint": "api-s3.innovation-hub-niedersachsen.de",
"port": 443,
"useSSL": true,
"accessKey": "AbCdEfGhIjKlMnOpQrSt",
"secretKey": "UvWxYz1234567890AbCdEfGhIjKlMnOpQrStUvWx"
},
"jwt": {
"secret": "@S2!q@@wXz$dCQ8JoVsHLpzaJ6JCfB",
"expiresIn": 3600
},
"auth": {
"admin": { "password": "A-InnoHUB_2025!", "admin": true },
"user": { "password": "U-InnoHUB_2025!", "admin": false }
}
}

View File

@@ -1,10 +1,10 @@
{
"minio": {
"endPoint": "sws3.innovation-hub-niedersachsen.de",
"endPoint": "api-s3.innovation-hub-niedersachsen.de",
"port": 443,
"useSSL": true,
"accessKey": "wjpKrmaqXra99rX3D61H",
"secretKey": "fTPi0u0FR6Lv9Y9IKydWv6WM0EA5XrsK008HCt9u"
"accessKey": "AbCdEfGhIjKlMnOpQrSt",
"secretKey": "UvWxYz1234567890AbCdEfGhIjKlMnOpQrStUvWx"
},
"jwt": {
"secret": "@S2!q@@wXz$dCQ8JoVsHLpzaJ6JCfB",
@@ -14,4 +14,4 @@
"admin": { "password": "A-InnoHUB_2025!", "admin": true },
"user": { "password": "U-InnoHUB_2025!", "admin": false }
}
}
}

View File

@@ -1,22 +1,17 @@
{
"minio": {
"endPoint": "api-s3.innovation-hub-niedersachsen.de",
"port": 443,
"accessKey": "AbCdEfGhIjKlMnOpQrSt",
"secretKey": "UvWxYz1234567890AbCdEfGhIjKlMnOpQrStUvWx"
},
"jwt": {
"secret": "@S2!q@@wXz$dCQ8JoVsHLpzaJ6JCfB",
"expiresIn": 3600
},
"auth": {
"admin": {
"password": "A-InnoHUB_2025!",
"admin": true
},
"user": {
"password": "U-InnoHUB_2025!",
"admin": false
}
}
}
"minio": {
"endPoint": "api-s3.innovation-hub-niedersachsen.de",
"port": 443,
"useSSL": true,
"accessKey": "GxKhfnfkNvlDU7qzsz0D",
"secretKey": "cqSM5rIRr4MPtqzu2sNKgmB9k2OghPbyxwAWogeM"
},
"jwt": {
"secret": "@S2!q@@wXz$dCQ8JoVsHLpzaJ6JCfB",
"expiresIn": 3600
},
"auth": {
"admin": { "password": "A-InnoHUB_2025!", "admin": true },
"user": { "password": "U-InnoHUB_2025!", "admin": false }
}
}

View File

@@ -42,6 +42,7 @@
let formErrors: Record<string, any> | null = $state(null);
let etag: string | null = $state(null);
let files: FileList | null = $state(null);
let fileInput = $state(null);
// Model Variablen für Upload
let openUL = $state(false);
@@ -102,6 +103,7 @@
openUL = false;
name = '';
files = null;
fileInput.value = "";
await invalidateAll();
crimesList = data.crimesList;
}
@@ -132,17 +134,17 @@
// big endian!
let file = files[0];
let file_header = file.slice(0, 4);
console.log(file_header);
let header_bytes = await file_header.bytes();
let file_header_hex = '0x' + header_bytes.toHex().toString();
const fileHeader = file.slice(0, 4);
const buffer = await fileHeader.arrayBuffer();
console.log(fileHeader);
let headerBytes = new Uint8Array(buffer);
let fileHeaderHex = '0x' + headerBytes.toHex().toString();
if (GLD_MAGIC == swap_endian(file_header_hex)) {
if (GLD_MAGIC == swap_endian(fileHeaderHex)) {
return true;
} else {
return false;
}
return true;
}
async function getUrl() {
@@ -287,8 +289,34 @@ Mit freundlichen Grüßen,
open = false;
isError = false;
}
// drag and drop functionality
let isDragging = $state(false);
async function handleDrop(event) {
event.preventDefault();
isDragging = false;
if (event.dataTransfer?.files?.length) {
files = event.dataTransfer.files;
}
if (!(await check_valid_glb_file())) {
formErrors = { file: 'Keine gültige .GLD-Datei' }
// reset form fields etc.
files = null;
fileInput.value = '';
} else {
formErrors = { ...formErrors, file: ''}
};
}
</script>
<svelte:window
on:dragover|preventDefault
on:drop|preventDefault
/>
{#if data.vorgang && crimesList}
<div class="-z-10 bg-white">
<div class="flex flex-col items-center justify-center w-full">
@@ -415,7 +443,13 @@ Mit freundlichen Grüßen,
</span>
</label>
<div
class="mt-2 flex justify-center rounded-lg border border-dashed border-gray-900/25 px-6 py-10"
class="mt-2 flex justify-center rounded-lg border border-dashed px-6 py-10
{isDragging
? 'border-blue-500 bg-blue-50'
: 'border-gray-900/25'}"
on:dragover|preventDefault={() => (isDragging = true)}
on:dragleave={() => (isDragging = false)}
on:drop={handleDrop}
>
<div class="text-center">
<FileRect />
@@ -425,7 +459,7 @@ Mit freundlichen Grüßen,
class="relative cursor-pointer rounded-md bg-white font-semibold text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-600 focus-within:ring-offset-2 hover:text-indigo-500"
>
<span>Wähle eine Datei aus</span>
<input id="file" bind:files name="file" type="file" class="sr-only" />
<input id="file" bind:this={fileInput} bind:files name="file" type="file" class="sr-only" />
</label>
<p class="pl-1">oder ziehe sie ins Feld</p>
</div>