Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi, I just deployed my Umbraco 11 website.
I did
dotnet published
in the CLI and then copied the content of bin/Debug/net7.0/publish to my ftp.
The website is coming, but most of the media is not there. Only the images of the homepage (not all of them - one section is missing).
I noticed that the /publish folder size is ~ 280mb but my media folder is 1.54GB !
So where should I upload the media folder in the ftp?
Thanks.
the media folder should sit under wwwroot
Right. And this is where I put them while running on local. But when I did dotnet publish it didn’t include the media. Should I just copy it manually after do dotnet publish?
Hi Meni
To your .csproj file you can add;
<ItemGroup> <None Include="wwwroot\**"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> </ItemGroup>
That will copy all contents from the wwwroot including your media folder to your publish folder on build.
See this question: https://stackoverflow.com/questions/51341844/some-files-in-wwwroot-folder-are-not-published-in-asp-net-core-web-deploy
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Umbraco 11: Where should I put / upload media folder when do dotnet publish?
Hi, I just deployed my Umbraco 11 website.
I did
in the CLI and then copied the content of bin/Debug/net7.0/publish to my ftp.
The website is coming, but most of the media is not there. Only the images of the homepage (not all of them - one section is missing).
I noticed that the /publish folder size is ~ 280mb but my media folder is 1.54GB !
So where should I upload the media folder in the ftp?
Thanks.
the media folder should sit under wwwroot
Right. And this is where I put them while running on local. But when I did dotnet publish it didn’t include the media. Should I just copy it manually after do dotnet publish?
Hi Meni
To your .csproj file you can add;
That will copy all contents from the wwwroot including your media folder to your publish folder on build.
See this question: https://stackoverflow.com/questions/51341844/some-files-in-wwwroot-folder-are-not-published-in-asp-net-core-web-deploy
is working on a reply...