Yash Worlikar commited on
Commit
823ded3
·
1 Parent(s): 94e843c

added temp folder

Browse files
.gitignore CHANGED
@@ -362,4 +362,4 @@ MigrationBackup/
362
  # Fody - auto-generated XML schema
363
  FodyWeavers.xsd
364
  /appsettings.Development.json
365
- /wwwroot/TempImages
 
362
  # Fody - auto-generated XML schema
363
  FodyWeavers.xsd
364
  /appsettings.Development.json
365
+ /wwwroot/temp/*
Components/Pages/Home.razor CHANGED
@@ -115,11 +115,7 @@
115
  if (imageFile != null)
116
  {
117
  // Ensure the TempImages folder exists
118
- var folderPath = Path.Combine("wwwroot", "TempImages");
119
- if (!Directory.Exists(folderPath))
120
- {
121
- Directory.CreateDirectory(folderPath);
122
- }
123
 
124
  // Save the file to the server
125
  var filePath = Path.Combine(folderPath, imageFile.Name);
 
115
  if (imageFile != null)
116
  {
117
  // Ensure the TempImages folder exists
118
+ var folderPath = Path.Combine("wwwroot", "temp");
 
 
 
 
119
 
120
  // Save the file to the server
121
  var filePath = Path.Combine(folderPath, imageFile.Name);
Dockerfile CHANGED
@@ -21,5 +21,6 @@ RUN dotnet publish "./FoodHealthChecker.csproj" -c $BUILD_CONFIGURATION -o /app/
21
 
22
  FROM base AS final
23
  WORKDIR /app
 
24
  COPY --from=publish /app/publish .
25
  ENTRYPOINT ["dotnet", "FoodHealthChecker.dll"]
 
21
 
22
  FROM base AS final
23
  WORKDIR /app
24
+ RUN mkdir -p /app/wwwroot/temp
25
  COPY --from=publish /app/publish .
26
  ENTRYPOINT ["dotnet", "FoodHealthChecker.dll"]
FoodHealthChecker.csproj CHANGED
@@ -14,4 +14,7 @@
14
  <PackageReference Include="Microsoft.SemanticKernel" Version="1.12.0" />
15
  <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" />
16
  </ItemGroup>
 
 
 
17
  </Project>
 
14
  <PackageReference Include="Microsoft.SemanticKernel" Version="1.12.0" />
15
  <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" />
16
  </ItemGroup>
17
+ <ItemGroup>
18
+ <Folder Include="wwwroot\temp\" />
19
+ </ItemGroup>
20
  </Project>