@wordpress/upload-media
Version:
Core media upload logic.
28 lines (27 loc) • 624 B
JavaScript
function getItems(state) {
return state.queue;
}
function isUploading(state) {
return state.queue.length >= 1;
}
function isUploadingByUrl(state, url) {
return state.queue.some(
(item) => item.attachment?.url === url || item.sourceUrl === url
);
}
function isUploadingById(state, attachmentId) {
return state.queue.some(
(item) => item.attachment?.id === attachmentId || item.sourceAttachmentId === attachmentId
);
}
function getSettings(state) {
return state.settings;
}
export {
getItems,
getSettings,
isUploading,
isUploadingById,
isUploadingByUrl
};
//# sourceMappingURL=selectors.js.map