TryCatchLearn / DatingApp-v6

586 stars 338 forks source link

Cloudinary Issue #8

Open Krivirus opened 3 years ago

Krivirus commented 3 years ago

image Please tell me how can i fix it.

API.Middleware.ExceptionMiddleware[0] Cloud name must be specified in Account! System.ArgumentException: Cloud name must be specified in Account! at CloudinaryDotNet.ApiShared..ctor(Account account) at CloudinaryDotNet.Api..ctor(Account account) at CloudinaryDotNet.Cloudinary..ctor(Account account) at API.Services.PhotoService..ctor(IOptions`1 config) in C:\Users\Krish\Downloads\Project Data\Clozest\API\Services\PhotoService.cs:line 25

punkouter2021 commented 3 years ago

Need cloudinary settings in your .json file ?

surajdotnet commented 2 years ago

You need to first create a Cloudinary account here https://cloudinary.com/users/register/free
and copy the SDK setting in appsetting.development.json

and update your appsetting.development.json as below

{ "ConnectionStrings" : { "DefaultConnection": "Data source=datingapp.db" }, "TokenKey": "super secret unguessable key", "CloudinarySettings":{ "CloudName": "cloudname", "ApiKey": "apikey", "ApiSecret": "apisecret" }, "Logging": { "LogLevel": { "Default": "Information", "Microsoft": "Information", "Microsoft.Hosting.Lifetime": "Information" } } }