Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media #3708

Merged
merged 26 commits into from
Nov 5, 2024
Merged

Media #3708

merged 26 commits into from
Nov 5, 2024

Conversation

felixfeng33
Copy link
Collaborator

Checklist

  • yarn typecheck
  • yarn lint:fix
  • yarn test
  • yarn brl
  • yarn changeset
  • ui changelog

Copy link

codesandbox bot commented Nov 2, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

vercel bot commented Nov 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
plate ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2024 3:31am

Copy link

changeset-bot bot commented Nov 2, 2024

🦋 Changeset detected

Latest commit: 702ad16

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@udecode/plate-ai Minor
@udecode/plate-dnd Minor
@udecode/plate-media Minor
@udecode/plate-docx Minor
@udecode/plate Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

data: { invalidateFiles: File[] };
};

export type uploadConfig = Partial<Record<AllowedFileType, MediaItemConfig>>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export type uploadConfig = Partial<Record<AllowedFileType, MediaItemConfig>>;
export type UploadConfig = Partial<Record<AllowedFileType, MediaItemConfig>>;


export type UploadError = {
code: UploadErrorCode;
data: { invalidateFiles: File[] };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
data: { invalidateFiles: File[] };
data: { files: File[] };

uploadingFiles: Record<string, File>;
// Whether multiple files of the same type can be uploaded.
multiple?: boolean;
uploadError?: UploadError | null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uploadError?: UploadError | null;
error?: UploadError | null;

// Whether multiple files of the same type can be uploaded.
multiple?: boolean;
uploadError?: UploadError | null;
uploadMaxFileCount?: number;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uploadMaxFileCount?: number;
maxFileCount?: number;

},
}))
.extendApi(({ getOption, setOption }) => ({
addUploadingFile: (id: string, file: File) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
addUploadingFile: (id: string, file: File) => {
addFile: (id: string, file: File) => {

same for others

@felixfeng33 felixfeng33 merged commit 2a01d06 into main Nov 5, 2024
3 of 4 checks passed
@felixfeng33 felixfeng33 deleted the media branch November 5, 2024 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants