Compare commits
11 Commits
f008cee404
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 77e506ea4c | |||
| 810b020d7d | |||
| 5be89f83fd | |||
| 2a7783004a | |||
| 6f9b386c18 | |||
| b4d9824942 | |||
| 776cc7a1f0 | |||
| eaa75833df | |||
| 30d457f562 | |||
|
|
c1dd9092ea | ||
| 79e0b01796 |
35
config.json
35
config.json
@@ -1,22 +1,17 @@
|
|||||||
{
|
{
|
||||||
"minio": {
|
"minio": {
|
||||||
"endPoint": "api-s3.innovation-hub-niedersachsen.de",
|
"endPoint": "api-s3.innovation-hub-niedersachsen.de",
|
||||||
"port": 443,
|
"port": 443,
|
||||||
"accessKey": "AbCdEfGhIjKlMnOpQrSt",
|
"useSSL": true,
|
||||||
"secretKey": "UvWxYz1234567890AbCdEfGhIjKlMnOpQrStUvWx"
|
"accessKey": "AbCdEfGhIjKlMnOpQrSt",
|
||||||
},
|
"secretKey": "UvWxYz1234567890AbCdEfGhIjKlMnOpQrStUvWx"
|
||||||
"jwt": {
|
},
|
||||||
"secret": "@S2!q@@wXz$dCQ8JoVsHLpzaJ6JCfB",
|
"jwt": {
|
||||||
"expiresIn": 3600
|
"secret": "@S2!q@@wXz$dCQ8JoVsHLpzaJ6JCfB",
|
||||||
},
|
"expiresIn": 3600
|
||||||
"auth": {
|
},
|
||||||
"admin": {
|
"auth": {
|
||||||
"password": "A-InnoHUB_2025!",
|
"admin": { "password": "A-InnoHUB_2025!", "admin": true },
|
||||||
"admin": true
|
"user": { "password": "U-InnoHUB_2025!", "admin": false }
|
||||||
},
|
}
|
||||||
"user": {
|
|
||||||
"password": "U-InnoHUB_2025!",
|
|
||||||
"admin": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"minio": {
|
"minio": {
|
||||||
"endPoint": "sws3.innovation-hub-niedersachsen.de",
|
"endPoint": "api-s3.innovation-hub-niedersachsen.de",
|
||||||
"port": 443,
|
"port": 443,
|
||||||
"useSSL": true,
|
"useSSL": true,
|
||||||
"accessKey": "wjpKrmaqXra99rX3D61H",
|
"accessKey": "AbCdEfGhIjKlMnOpQrSt",
|
||||||
"secretKey": "fTPi0u0FR6Lv9Y9IKydWv6WM0EA5XrsK008HCt9u"
|
"secretKey": "UvWxYz1234567890AbCdEfGhIjKlMnOpQrStUvWx"
|
||||||
},
|
},
|
||||||
"jwt": {
|
"jwt": {
|
||||||
"secret": "@S2!q@@wXz$dCQ8JoVsHLpzaJ6JCfB",
|
"secret": "@S2!q@@wXz$dCQ8JoVsHLpzaJ6JCfB",
|
||||||
|
|||||||
@@ -1,22 +1,17 @@
|
|||||||
{
|
{
|
||||||
"minio": {
|
"minio": {
|
||||||
"endPoint": "api-s3.innovation-hub-niedersachsen.de",
|
"endPoint": "api-s3.innovation-hub-niedersachsen.de",
|
||||||
"port": 443,
|
"port": 443,
|
||||||
"accessKey": "AbCdEfGhIjKlMnOpQrSt",
|
"useSSL": true,
|
||||||
"secretKey": "UvWxYz1234567890AbCdEfGhIjKlMnOpQrStUvWx"
|
"accessKey": "GxKhfnfkNvlDU7qzsz0D",
|
||||||
},
|
"secretKey": "cqSM5rIRr4MPtqzu2sNKgmB9k2OghPbyxwAWogeM"
|
||||||
"jwt": {
|
},
|
||||||
"secret": "@S2!q@@wXz$dCQ8JoVsHLpzaJ6JCfB",
|
"jwt": {
|
||||||
"expiresIn": 3600
|
"secret": "@S2!q@@wXz$dCQ8JoVsHLpzaJ6JCfB",
|
||||||
},
|
"expiresIn": 3600
|
||||||
"auth": {
|
},
|
||||||
"admin": {
|
"auth": {
|
||||||
"password": "A-InnoHUB_2025!",
|
"admin": { "password": "A-InnoHUB_2025!", "admin": true },
|
||||||
"admin": true
|
"user": { "password": "U-InnoHUB_2025!", "admin": false }
|
||||||
},
|
}
|
||||||
"user": {
|
|
||||||
"password": "U-InnoHUB_2025!",
|
|
||||||
"admin": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -42,6 +42,7 @@
|
|||||||
let formErrors: Record<string, any> | null = $state(null);
|
let formErrors: Record<string, any> | null = $state(null);
|
||||||
let etag: string | null = $state(null);
|
let etag: string | null = $state(null);
|
||||||
let files: FileList | null = $state(null);
|
let files: FileList | null = $state(null);
|
||||||
|
let fileInput = $state(null);
|
||||||
|
|
||||||
// Model Variablen für Upload
|
// Model Variablen für Upload
|
||||||
let openUL = $state(false);
|
let openUL = $state(false);
|
||||||
@@ -102,6 +103,7 @@
|
|||||||
openUL = false;
|
openUL = false;
|
||||||
name = '';
|
name = '';
|
||||||
files = null;
|
files = null;
|
||||||
|
fileInput.value = "";
|
||||||
await invalidateAll();
|
await invalidateAll();
|
||||||
crimesList = data.crimesList;
|
crimesList = data.crimesList;
|
||||||
}
|
}
|
||||||
@@ -132,17 +134,17 @@
|
|||||||
|
|
||||||
// big endian!
|
// big endian!
|
||||||
let file = files[0];
|
let file = files[0];
|
||||||
let file_header = file.slice(0, 4);
|
const fileHeader = file.slice(0, 4);
|
||||||
console.log(file_header);
|
const buffer = await fileHeader.arrayBuffer();
|
||||||
let header_bytes = await file_header.bytes();
|
console.log(fileHeader);
|
||||||
let file_header_hex = '0x' + header_bytes.toHex().toString();
|
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;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getUrl() {
|
async function getUrl() {
|
||||||
@@ -287,8 +289,34 @@ Mit freundlichen Grüßen,
|
|||||||
open = false;
|
open = false;
|
||||||
isError = 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>
|
</script>
|
||||||
|
|
||||||
|
<svelte:window
|
||||||
|
on:dragover|preventDefault
|
||||||
|
on:drop|preventDefault
|
||||||
|
/>
|
||||||
|
|
||||||
{#if data.vorgang && crimesList}
|
{#if data.vorgang && crimesList}
|
||||||
<div class="-z-10 bg-white">
|
<div class="-z-10 bg-white">
|
||||||
<div class="flex flex-col items-center justify-center w-full">
|
<div class="flex flex-col items-center justify-center w-full">
|
||||||
@@ -415,7 +443,13 @@ Mit freundlichen Grüßen,
|
|||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<div
|
<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">
|
<div class="text-center">
|
||||||
<FileRect />
|
<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"
|
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>
|
<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>
|
</label>
|
||||||
<p class="pl-1">oder ziehe sie ins Feld</p>
|
<p class="pl-1">oder ziehe sie ins Feld</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user