Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6784

File upload and serve extremely slow

$
0
0

I have this published asp.netcore app on Ubuntu LTS server. It should receive and save audio files on server. Here's how I implemented it (Audio is IFormFile, the request is sent as formdata):

if (dto.Audio != null && dto.Audio.ContentType.Contains("audio")){    string path = "Audio/" +        Path.GetRandomFileName().Remove(7, 4) +        dto.Audio.FileName[^4..];    using (var fs = System.IO.File.Create("wwwroot/" + path))        dto.Audio.CopyTo(fs);}

It's working, but very slow. Taking about 6-7 mins to upload, and same for serving the file of around 30 MB size.

The app is handling requests itself (Kestrel), I'm not using reverse proxy.


Viewing all articles
Browse latest Browse all 6784

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>