Try our conversational search powered by Generative AI!

Azure web app is creating new blobs, not replacing them

Vote:
 

Hello. 

I followed the link below when migrating an EpiServer 7.0 (or 7.1, I don't know exactly) to Azure. I run my web app on two instances. Everything seems to work fine, the Service Bus handles updates between the instances.

However, I have an issue with the blob storage. First, I uploaded an image and it is seen on both instances in the various browsers and the image is saved in blob storage. So far so good. However, when I am in CMS admin mode and changes the image by turning it upside down, or replacing it with another image, instead of changing the blob, it creates a new one. This means that I now have multiple blobs in my container and the one showing in the browsers is the first one, not the ones with my changes.

Any idea on how to make the upside down-blob replace the older one instead of creating a new one? I´m almost a totally beginner at EPI, but have more experience with Azure.

http://world.episerver.com/documentation/Items/Developers-Guide/Episerver-CMS/9/Deployment/Deployment-scenarios/Deploying-to-Azure-webapps/

Thank you,

//Martin

#175585
Feb 23, 2017 16:55
Vote:
 

Hi Martin, and welcome to the Episerver world :-)

Images/Files are versioned, just like any other IContent. So you get one blob per version. 

/Erik

#175670
Feb 27, 2017 9:29
Vote:
 

Hi Erik and thank you for your reply! 

I don't se a preview of the image I uploaded so here is the link i case it doesn't work. https://imgur.com/a/o3P4y

First, I uploaded the image named bluecar-one.jpg and it is seen in my browser with a nice number one above the car. Now, I want to change the number one to number two. So I edit the image in Paint on my local computer (keep the name bluecar-one.jpg) and then i EPi, I click the plus-sign-button and "Yes, I want to replace the Image". In the right hand side in my pasted image from EPi, I see an image of my blue car with number two above and still named bluecar-one.jpg. (This is not desplayed in my image, just described in text) So far so good. This will create a new blob, as you say. However, in editmode in EPi I see the updated version, but after a publish it is still the old image seen when I browse to the page. 

To get around this, I have to do as seen in the image in the link: When I want to do an update, I have to upload a new image with another name (bluecar-two.jpg) and use that image. This will work but I don't think this is the correct way to do it, I mean, one must be able to reuse the name for images. 

So my question is: how do you do to update the blue car image so the pasted link in my attached image (src="/siteassets/testbilder/bluecar-one.jpg) will point to the bluecar-one.jpg image with a number two in it?

Image of a blue car

I hope you understand what I was writing above, I felt that there was a mix of the word "image" when I was writing about the image I uploaded at imgur and the image of the blue car.

//Martin

#175678
Feb 27, 2017 11:57
Vote:
 

Have you emptied your browser cache?

I wouldn't recommend updating an image without updating the image name, because the image may be cached in the browser and in proxies/CDNs.

#175686
Feb 27, 2017 13:24
Vote:
 

Yep, browser cache was the culprit. Thank you so much for your help.

A following question, even though you wouldn't recomment using the same name: Is there a best practice if the customer still wants to use the same name? And also, what would you suggest that I do with all the blobs that we will never use again?

#175688
Feb 27, 2017 14:14
Vote:
 

Hey,

There is a task under CMS>Admin called "abandon CMS Blobs" should clean them up.  By default,  I thought the url for images is the same no matter which blob version, so I'm not sure why the client would care the name of the blob.  Saying that I don't know where to start with using the same blob name.

#175770
Mar 01, 2017 15:12
Vote:
 

I'm pretty sure the remove abandoned blobs job only deletes blobs that are not used anymore, i.e. has been deleted. It will not delete blobs for older versions of an image that still exists.

If having the same filename for different images you would need to add a querystring that busts the cache. But by replacing the image with an image with a new name you would solve both your problems (cache and having unused blobs).

#175862
Mar 04, 2017 16:31
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.