Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix fileName is not respected when the image is uploaded via drag&dropped #6960
Contrary to all the other uploads we have, when uploading an image to the editor via drag&drop without an image block previously created the file name of the image we upload is not respect.
The fileName is now passed from the transform to the region where we upload via the alt attribute. Url is being used to store the blob and if we append '?fileName='or change it in another way the browsers start ignoring the blob URL. Given that we pass the file via URL attribute from the transform to the upload code, passing the fileName in the alt attribute seems the most logical way.
I think respecting file names is the expected behavior and will be important to correctly show upload error messages for drag&drop without previously created images.
How has this been tested?
Upload an image via drag&drop to the editor without previously creating an image block.