ASP.NET CORE MVC For some reason any non png/img files are not being recognized.
I have a GLTF file which is a 3D model, when i open it in my brower it gives 404, the dir has a sub dir called /textures , i can open them and see them .
Images show my issues
20 Replies
By default, only files from
wwwroot
are served
Are those files inside of wwwroot
somewhere?here is wwwroot
Seems fine
Maybe the file serving middleware just doesn't recognize gltf files as files it should serve
idk what middleware is. Im learning asp.net, definately not a pro at this
does anything here look wrong with this part?
Yeah, I had to add some stuff to my own project to make it support avif files, gimme a sec
No, the csproj looks fine
So
also btw, i compiled some js code from seperate project. So this program is a frankenstien of 2 js code bases
You will need to set
ContentTypeProvider
in your .UseStaticFiles()
middleware
You should have app.UseStaticFiles()
somewhere in Program.cs
ok, got that now i will check
Something like this should do the trick
You'll need to look up the MIME type for gLTF files
what the flip
I was trying to use ai to fix the issue earlier maybe it messed up project
¯\_(ツ)_/¯
give me a sec gotta clone my thing again, how should i set up mime?
idk what mime is 😢
Just google "gltf mime type"
ok
🙂 that fixed !! thank U
Nice
helll yeaaa