diff --git a/README.md b/README.md index 6bdd179..fa74869 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Blazor download files to the browser from c# without any JavaScript library or dependency. -BlazorDownloadFile is the solution to saving files on the client-side, and is perfect for web apps that generates files on the client. +BlazorDownloadFile is the solution to saving files on the client-side, and is perfect for web apps that generates files on the client. However if the file is coming from the server we recommend you to first try to use Content-Disposition attachment response header as it has more cross-browser compatibility. @@ -23,13 +23,13 @@ However if the file is coming from the server we recommend you to first try to u ## Register the service in your services method -`services.AddBlazorDownloadFile(ServiceLifetime lifetime = ServiceLifetime.Scoped);` +`builder.Services.AddBlazorDownloadFile();` Note: `ServiceLifetime.Singleton` is not supported. ## No javascript library reference dependency unless... -## If you are using Content-Security-Policy "script-src 'self'" then you need to add the script manually: +## If you are using Content-Security-Policy "script-src 'self'" then you need to add the script manually: ###