After I initially use the MediaUpload
element and I select to add a picture, it solely lets me add a PDF and all different recordsdata sorts in my laptop file supervisor are greyed out. That is good. Nonetheless once I wish to change all of it file sorts can be found to select from despite the fact that I’ve specified the mime sort software/pdf
.
{!pdfUrl && (
<MediaPlaceholder
worth={pdfID}
labels={{ title: "PDF" }}
onSelect={onPdfSelect}
settle for=".pdf"
/>
)}
{pdfUrl && (
<MediaUploadCheck>
<MediaUpload
onSelect={onPdfSelect}
allowedTypes={['application/pdf']}
worth={pdfID}
settle for=".pdf"
render={({ open }) => (
<IconButton
className="components-toolbar__control"
label="Substitute PDF"
icon="edit"
onClick={open}
/>
)}
/>
</MediaUploadCheck>
)}