Lint and fix size of S3 upload component overlay
This commit is contained in:
parent
d1ab0d2b67
commit
5f357ad2d8
|
@ -1,5 +1,4 @@
|
||||||
import API from "./api"
|
import API from "./api"
|
||||||
import { notificationStore } from "../stores/index.js"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Uploads an attachment to the server.
|
* Uploads an attachment to the server.
|
||||||
|
@ -40,7 +39,7 @@ export const externalUpload = async (datasourceId, bucket, key, data) => {
|
||||||
json: false,
|
json: false,
|
||||||
external: true,
|
external: true,
|
||||||
})
|
})
|
||||||
if (res.error) {
|
if (res?.error) {
|
||||||
throw "Could not upload file to signed URL"
|
throw "Could not upload file to signed URL"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,29 +98,34 @@
|
||||||
bind:fieldApi
|
bind:fieldApi
|
||||||
defaultValue={[]}
|
defaultValue={[]}
|
||||||
>
|
>
|
||||||
{#if fieldState}
|
<div class="content">
|
||||||
<CoreDropzone
|
{#if fieldState}
|
||||||
value={fieldState.value}
|
<CoreDropzone
|
||||||
disabled={loading || fieldState.disabled}
|
value={fieldState.value}
|
||||||
error={fieldState.error}
|
disabled={loading || fieldState.disabled}
|
||||||
on:change={e => {
|
error={fieldState.error}
|
||||||
fieldApi.setValue(e.detail)
|
on:change={e => {
|
||||||
}}
|
fieldApi.setValue(e.detail)
|
||||||
{processFiles}
|
}}
|
||||||
{handleFileTooLarge}
|
{processFiles}
|
||||||
maximum={1}
|
{handleFileTooLarge}
|
||||||
fileSizeLimit={MaxFileSize}
|
maximum={1}
|
||||||
/>
|
fileSizeLimit={MaxFileSize}
|
||||||
{/if}
|
/>
|
||||||
{#if loading}
|
{/if}
|
||||||
<div class="overlay" />
|
{#if loading}
|
||||||
<div class="loading">
|
<div class="overlay" />
|
||||||
<ProgressCircle />
|
<div class="loading">
|
||||||
</div>
|
<ProgressCircle />
|
||||||
{/if}
|
</div>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
</Field>
|
</Field>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.content {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
.overlay,
|
.overlay,
|
||||||
.loading {
|
.loading {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
@ -6,7 +6,6 @@ import {
|
||||||
authStore,
|
authStore,
|
||||||
stateStore,
|
stateStore,
|
||||||
uploadStore,
|
uploadStore,
|
||||||
notificationStore,
|
|
||||||
} from "stores"
|
} from "stores"
|
||||||
import { saveRow, deleteRow, executeQuery, triggerAutomation } from "api"
|
import { saveRow, deleteRow, executeQuery, triggerAutomation } from "api"
|
||||||
import { ActionTypes } from "constants"
|
import { ActionTypes } from "constants"
|
||||||
|
|
Loading…
Reference in New Issue