wp-auto-upload icon indicating copy to clipboard operation
wp-auto-upload copied to clipboard

Gutenberg Editor repeat upload every time when Save Draft

Open YohoYang opened this issue 2 years ago • 4 comments

If you do not refresh the page after saving in the Gutenberg editor, the images will be uploaded repeatedly

I use the following steps:

  1. Copy an article containing text and images from other web pages
  2. Paste into the Gutenberg editor, the images exists in the form of an external url
  3. Click Save Draft
  4. After saving, the picture on the page has not changed, but I checked the media library on another page and found that the picture was uploaded successfully.
  5. At this time, if I refresh the webpage, the images is displayed normally. But if I click Save Draft again at this time, the image will be uploaded again and again.

I hope to fix this problem, and refresh the Gutenberg editor data when the save is successful, or refresh the entire webpage directly. It should be a feasible method.

YohoYang avatar Oct 13 '21 14:10 YohoYang

@YohoYang this is for which version of plugin?

airani avatar Oct 13 '21 14:10 airani

@YohoYang this is for which version of plugin?

plugin is latest 3.3 from WordPress plugin store. And the WordPress version is latest 5.8.1 so.

YohoYang avatar Oct 13 '21 15:10 YohoYang

plugin is latest 3.3 from WordPress plugin store. And the WordPress version is latest 5.8.1 so.

Are you sure tested on v3.3 ? because I'm fixed this problem on v3.3 !

If you can please test again with another images and I'm testing too

airani avatar Oct 13 '21 15:10 airani

plugin is latest 3.3 from WordPress plugin store. And the WordPress version is latest 5.8.1 so.

Are you sure tested on v3.3 ? because I'm fixed this problem on v3.3 !

If you can please test again with another images and I'm testing too

Yes. I'm sure I tested on v3.3. And I tried again, the problem still happen.

I began to wonder if it was caused by work with other plugin, and finally I found the problem. I use a plugin to save images to an object storage service, similar to AWS S3, but since I am in China, I use Alibaba Cloud and use this plugin: https://wordpress.org/plugins/wposs/ I turned off this plug-in and tried to upload to the local, the problem did not happen again, the image will not be uploaded repeatedly.

But when I reopen the external object storage plugin, even though I set the Base URL as my object storage address, and Exclude Domains is also set to this address, files still uploaded repeatedly and have the same file name. This means that the file is not stored repeatedly, but the media library is repeatedly. can you try to fix it? thanks a lot.

YohoYang avatar Oct 13 '21 18:10 YohoYang