sunny-green
sunny-green•2y ago

How to disable the upload when clicking on the preview button of the Dragger?

<Dragger {...props} maxCount={1} style={{ background: "white" }} accept="image/png, image/jpeg, application/pdf"> {url ? ( <Image src={url.endsWith(".pdf") ? PdfIcon : url} /> ) : ( <p className="ant-upload-drag-icon"> <> <Image src={drag} preview={false} /> <p className="ant-upload-text"> {" "} <span style={{ color: "#FA6F6A" }}> Click to upload</span> or drag and drop </p> <p className="ant-upload-hint"> PDF, PNG and JPG (max file size 30 MB) </p> </> </p> )} </Dragger> This is my code.... when I'm clicking on my uploaded image, again file explorer is opening to upload new docs... I don't want that. I just want to see the preview.👋
1 Reply
robust-apricot
robust-apricot•2y ago
Hi @coops8, I believe antd docs have examples exactly what you try. https://ant.design/components/upload#components-upload-demo-picture-card I you encounter a problem, please let me know