-
I have nginx config similar to https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-3.1#configure-nginx and processor: namespace AppThumbnailer
{
public class ThumbnailWebProcessor : IImageWebProcessor
{
private static readonly ResizeOptions _resizeOptions = new ResizeOptions
{
Size = new Size(300),
Mode = ResizeMode.Max
};
private static readonly IEnumerable<string> _commands = new[]
{
"size"
};
public FormattedImage Process(
FormattedImage image,
ILogger logger,
IDictionary<string, string> commands,
CommandParser parser,
CultureInfo culture)
{
var command = commands.GetValueOrDefault("size");
if (command == "medium")
{
image.Image.Mutate(x => x.Resize(_resizeOptions));
image.Format = JpegFormat.Instance;
}
return image;
}
public IEnumerable<string> Commands => _commands;
}
} It's works fine, but produces random empty responses(without any app error). Nginx response:
App log:
Upd: Also, my app use signalr and shows images for many clients at same time. So maybe it's cache key lock problem? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I'm afraid I've never used nginx so cannot be of any help. The library doesn't have any cache locking and would throw IO exceptions if there were issues retrieving files from the cache. |
Beta Was this translation helpful? Give feedback.
-
Seems like it fixed #160 |
Beta Was this translation helpful? Give feedback.
Seems like it fixed #160