Skip to content

Commit

Permalink
Merge pull request #1902 from ThemeFuse/23043-beta-default-types-file…
Browse files Browse the repository at this point in the history
…-upload

fix(file upload): default types
  • Loading branch information
maxval1 authored Jun 20, 2023
2 parents 3e4c6c9 + 30ca2d3 commit 06adb9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion public/editor-client/src/customFile/addFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ export const addFile: AddFileData = {
type: "image"
},
states: new wp.media.controller.Library({
library: wp.media.query({ type: "image" }),
library: wp.media.query({
type: "image, audio, video, application, text, pdf"
}),
multiple: false,
title: t("Upload file"),
filterable: "all",
Expand Down
4 changes: 3 additions & 1 deletion public/editor-client/src/types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ declare global {
}): WPMediaLibrary;
};
};
query: (query: { type: "image" }) => WPMediaLibrary;
query: (query: {
type: "image, audio, video, application, text, pdf";
}) => WPMediaLibrary;
state: () => WPMediaLibrary;
}

Expand Down

0 comments on commit 06adb9e

Please sign in to comment.