[SOLVED] Problems with updating SVG File in Assets

I’m submitting a Bug report.

Current behavior

When I try to update a SVG File, it won’t update.

I have some files, where i removed the white “fill” from some forms. When I update, nothing changes. When i go to the text tap in the asset folder, there still is “fill:#ffffff” but it should be “fill:none”.

But if I update/upload the same SVG 3 times with the same file, suddenly it works.

Expected behavior

Would like to update the assets with just 1 upload.

Minimal reproduction of the problem

Tried it with different icons (i have a lot of them) and it was the same at least 5 times.

my gif was uploaded as a jpg. here the link to the animated version:
https://drive.google.com/file/d/1KG1TRal_NVXwiRbQiIClqyuG8TY9UmJl/view?usp=sharing

Environment

  • [ ] Cloud version

Browser:

  • [ ] Edge

Where do you have issues with the file? In the UI or in your client?

I cannot reproduce it in the UI, but I think it is a caching in your client. You can append the file version, e.g.

?version=2 to your URL. I will find a better solution, but at the moment, I do not have one.

Hi Sebastian.

So, after some trying I found a way to reproduce the problem.

It seems to have something to do with tags. I made the exact same svg graphic and uploaded it with two different names. One asset got an additional tag, the other I left be.

When trying to update the graphics, I had to to upload the one with the additional tag twice to trigger the update. The other one updated just fine.

Here ist the gif I made:
https://drive.google.com/file/d/1QoJvAmP_DEJHt3M3hDMBC035FwK9Is_p/view?usp=sharing

Here are the links to the graphics:

Without additional tag:
https://cloud.squidex.io/api/assets/stakwo/009f0fea-8e85-45c1-af9d-337ff978e5bd/star-1.svg?version=1

With additinal tag:
https://cloud.squidex.io/api/assets/stakwo/146879f2-11f3-420d-8169-2e898fa7fd5c/star-2.svg?version=2

If you switch the version numbers you can see, that with the additional tag it only saves the new version at the second try.

Sorry for my poor wording. Don’t now how to make it clearer…

The point is that the version is also increased with each update of tags. Not sure if this is the point.

I see. So when I add a tag, a new version is created. But the linked URL in the asset is not updated? So the version number is not right.

Your solution to just link with the current version number, is not really practical, as I don’t know how many versions exist in the background. I would have to try. Plus I can’t just link the files via image browser to other content.

Well, i just won’t add tags to my files I guess…

I think you are right, we use the file version now, but we should only use the normal version. I think the API has changed a while ago.

I haved this and will deploy it tomorrow or the day after…

This topic was automatically closed after 2 days. New replies are no longer allowed.