I pushed to an Azure free site to test things so far, and there is a problem with the three images on the page, they are returning 404 errors on Azure, but work fine on localhost.
The first time through the value for "source" is /media/m4aliqox/loneperson.png
I didn't create this folder, nor can I find it with a search inside visual studio, but I can find it in File Manager.
However, it does load just fine when on localhost, but on azure the images all return 404.
What do I need to do for the published image to not get a 404 on Azure?
thanks
@foreach (var article in previewArticles)
{
if(!article.IsVisible)
{
continue;
}
var articleImage = article.ArticleImage;
var crops = (from i in articleImage.Crops where i.Alias == "Thumb" select i).First();
string source = articleImage.Src;
var title = article.ArticleTitle;
var leadin = article.LeadIn;
var Article = article.Article;
The media is stored on the file system by default (in that /media folder). That means if you added the media items locally, they wouldn't be in Azure.
You can include the images in the .csproject, and then I think they should publish up to Azure with the the rest of the code.
But if you're going to be making content places in both Azure and local, you might want to use an Azure Blob Storage container to store media. This allows both azure and your local use the same media directory so that if you add media locally, Azure will see it (and vice versa).
Images shows in Dev but not in Azure
I pushed to an Azure free site to test things so far, and there is a problem with the three images on the page, they are returning 404 errors on Azure, but work fine on localhost.
The first time through the value for "source" is /media/m4aliqox/loneperson.png
I didn't create this folder, nor can I find it with a search inside visual studio, but I can find it in File Manager.
However, it does load just fine when on localhost, but on azure the images all return 404.
What do I need to do for the published image to not get a 404 on Azure? thanks
The media is stored on the file system by default (in that /media folder). That means if you added the media items locally, they wouldn't be in Azure.
You can include the images in the .csproject, and then I think they should publish up to Azure with the the rest of the code.
But if you're going to be making content places in both Azure and local, you might want to use an Azure Blob Storage container to store media. This allows both azure and your local use the same media directory so that if you add media locally, Azure will see it (and vice versa).
Here's the packages you can use to set that up.
(for v9) https://our.umbraco.com/packages/developer-tools/azure-blob-storage-provider/ (for v8,v7) https://our.umbraco.com/packages/collaboration/umbracofilesystemprovidersazure/
thank you, that fixes it.
is working on a reply...