You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to implement ImageSharp in a Blazor server app and following the documentation, I used the following code to set cache folder to Uploads (where my images are) and PhysicalFileSystemProvider to Uploads also.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Trying to implement ImageSharp in a Blazor server app and following the documentation, I used the following code to set cache folder to Uploads (where my images are) and PhysicalFileSystemProvider to Uploads also.
builder.Services.AddImageSharp() .SetRequestParser<QueryCollectionRequestParser>() .Configure<PhysicalFileSystemCacheOptions>(options => { options.CacheRootPath = "Uploads"; options.CacheFolder = "is-cache"; options.CacheFolderDepth = 8; }) .SetCache<PhysicalFileSystemCache>() .SetCacheKey<UriRelativeLowerInvariantCacheKey>() .Configure<PhysicalFileSystemProviderOptions>(options => options.ProviderRootPath = "Uploads") .AddProvider<PhysicalFileSystemProvider>() .AddProcessor<ResizeWebProcessor>();
then I added the app.UseImageSharp(); before app.UseStaticFiles();
Can you please help me on this?
Beta Was this translation helpful? Give feedback.
All reactions