From f75d85dbb75783440ae1331c51c626fcac90ceb0 Mon Sep 17 00:00:00 2001 From: rahimi rahimi Date: Mon, 29 Dec 2025 16:13:48 +0330 Subject: [PATCH] test call --- src/GreenHome.Api/My_StaticFiles/calltest.html | 2 +- src/GreenHome.Api/Program.cs | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/GreenHome.Api/My_StaticFiles/calltest.html b/src/GreenHome.Api/My_StaticFiles/calltest.html index 93bb0bd..cb821be 100644 --- a/src/GreenHome.Api/My_StaticFiles/calltest.html +++ b/src/GreenHome.Api/My_StaticFiles/calltest.html @@ -1 +1 @@ -TY09192530212#ghback.nabaksoft.ir/calltest.amr \ No newline at end of file +TY09192530212#https://ghback.nabaksoft.ir/My_StaticFiles/output.amr \ No newline at end of file diff --git a/src/GreenHome.Api/Program.cs b/src/GreenHome.Api/Program.cs index 7f00eec..1e92c0d 100644 --- a/src/GreenHome.Api/Program.cs +++ b/src/GreenHome.Api/Program.cs @@ -4,6 +4,7 @@ using GreenHome.Application; using GreenHome.Infrastructure; using GreenHome.Sms.Ippanel; using GreenHome.VoiceCall.Avanak; +using Microsoft.AspNetCore.StaticFiles; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.FileProviders; using Scalar.AspNetCore; @@ -107,11 +108,15 @@ if (!app.Environment.IsDevelopment()) app.UseCors(CorsPolicy); app.UseAuthorization(); +var provider = new FileExtensionContentTypeProvider(); +provider.Mappings[".amr"] = "audio/amr"; + app.UseStaticFiles(new StaticFileOptions { FileProvider = new PhysicalFileProvider( Path.Combine(builder.Environment.ContentRootPath, "My_StaticFiles")), - RequestPath = "/My_StaticFiles" + RequestPath = "/My_StaticFiles", + ContentTypeProvider = provider }); app.MapControllers();