sanity-io / sanity

Sanity Studio – Rapidly configure content workspaces powered by structured content
https://www.sanity.io
MIT License
5.06k stars 410 forks source link

Image Copy Paste & Drag and Drop not uploading images in Sanity Studio #2442

Closed PranjalMaithani closed 1 year ago

PranjalMaithani commented 3 years ago

In the Sanity Studio, image copy paste and 'drag and drop' are not working. Images can only be uploaded by clicking the upload button.

However, on using the NextJS Starter Project, image copy paste is working fine and drag and drop gives this message:

image

The starter project uses older versions of sanity.

To Reproduce

Steps to reproduce the behavior:

  1. Create a new project with sanity init
  2. Select any template for the schema
  3. sanity start inside the project
  4. Copy paste an image in the image field of a document/object
  5. Drag and drop an image on the image field

Which versions of Sanity are you using?

@sanity/cli 2.8.0 (up to date) @sanity/cli 2.8.0 (up to date) @sanity/client 2.8.0 (up to date) @sanity/image-url 0.140.22 (up to date)

What operating system are you using?

Ubuntu 20.04.2 LTS

Which versions of Node.js / npm are you running?

Node v14.16.0 Yarn 1.22.10

Additional context

I tried using the older versions of sanity and got the same results as the starter project, mentioned above. These are the dependencies in the package json:

"dependencies": {
    "@sanity/base": "^2.3.2",
    "@sanity/block-content-to-react": "2.0.7",
    "@sanity/color-input": "2.2.6",
    "@sanity/components": "2.2.6",
    "@sanity/core": "2.2.6",
    "@sanity/default-layout": "2.3.2",
    "@sanity/default-login": "2.2.6",
    "@sanity/desk-tool": "2.3.2",
    "@sanity/vision": "2.2.6",
    "prop-types": "^15.7",
    "react": "16.14.0",
    "react-barcode": "^1.4.0",
    "react-dom": "16.14.0",
    "react-icons": "^3.11.0",
    "react-moveable": "^0.22.6",
    "resize-observer": "^1.0.0"
  },

Also, after copy pasting/dragging an image, I found the image sitting in the DOM in a div with opacity = 0

image

jcontonio commented 2 years ago

this is happening in Firefox 98.0.1 since the last release, 2.29.1.

kmelve commented 1 year ago

Hi!

We are currently working on improving our workflows and follow-up on our open GitHub repository. In that work, we have decided to close most issues older than the release of Sanity Studio v3.

We value your feedback, so if this issue is still important to you and relevant for Sanity Studio v3, please search for relevant open issues. If you can’t find any, open a new one and link to relevant comments in this thread. For questions about how to do something, please post them in the slack community.