Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
TimMikeladze committed Nov 30, 2023
1 parent 375ffdd commit f6f5c82
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 2,576 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@
"@testing-library/react": "^14.1.2",
"@types/bytes": "^3.1.4",
"@types/dotenv": "^8.2.0",
"@types/minio": "^7.1.1",
"@types/node": "20.10.0",
"@types/pg": "^8.10.9",
"@types/react": "18.2.39",
Expand Down Expand Up @@ -192,7 +191,6 @@
"@aws-sdk/s3-presigned-post": "^3.460.0",
"@aws-sdk/s3-request-presigner": "^3.460.0",
"bytes": "^3.1.2",
"minio": "^7.1.3",
"nanoid": "^5.0.3",
"next-tool": "^0.0.5"
}
Expand Down
4 changes: 2 additions & 2 deletions src/NextUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ export class NextUpload extends NextTool<NextUploadConfig, NextUploadStore> {
private async makeDefaultPostPolicy(
config: RequiredField<UploadTypeConfig, 'path'>,
{
fileType,
// fileType,
// metadata,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
id,
}: {
fileType: string;
// fileType: string;
id: string;
// metadata: Metadata;
}
Expand Down
8 changes: 8 additions & 0 deletions src/polyfills/FileReader.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
/* eslint-disable */
export class FileReader {
result: any = null;

error: any = null;

onload: ((event: Event) => void) | null = null;

onerror: ((event: Event) => void) | null = null;

onloadstart: ((event: Event) => void) | null = null;

onloadend: ((event: Event) => void) | null = null;

onprogress: ((event: Event) => void) | null = null;

readyState: number = 0;

abort(): void {}
Expand Down
2 changes: 1 addition & 1 deletion tests/NextUpload.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import KeyvPostgres from '@keyv/postgres';
import { nanoid } from 'nanoid';
import { migrate } from 'drizzle-orm/node-postgres/migrator';

import { HeadBucketCommand } from '@aws-sdk/client-s3';
import {
KeyvStore,
NextUpload,
Expand All @@ -15,7 +16,6 @@ import {
} from '../src';
import { DrizzlePgStore } from '../src/store/drizzle/pg/DrizzlePgStore';
import { getDb } from './db/getDb';
import { HeadBucketCommand } from '@aws-sdk/client-s3';

const runTests = async (
name: string,
Expand Down
Loading

0 comments on commit f6f5c82

Please sign in to comment.