1
0
Fork 0
mirror of synced 2024-08-22 21:41:49 +12:00

Lint and fix size of S3 upload component overlay

This commit is contained in:
Andrew Kingston 2022-01-14 09:20:20 +00:00
parent 73f2c9bd35
commit 0b0618aa84
3 changed files with 26 additions and 23 deletions

View file

@ -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"
} }
} }

View file

@ -98,6 +98,7 @@
bind:fieldApi bind:fieldApi
defaultValue={[]} defaultValue={[]}
> >
<div class="content">
{#if fieldState} {#if fieldState}
<CoreDropzone <CoreDropzone
value={fieldState.value} value={fieldState.value}
@ -118,9 +119,13 @@
<ProgressCircle /> <ProgressCircle />
</div> </div>
{/if} {/if}
</div>
</Field> </Field>
<style> <style>
.content {
position: relative;
}
.overlay, .overlay,
.loading { .loading {
position: absolute; position: absolute;

View file

@ -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"