How to ulpoad image file in Retrofit

I have declared the interface. @POST(“user/create”) Call<ModelsRegister> modelsRegisterCall(@Part MultipartBody.Part photo , @Body ModelsRegister modelsRegister); this is the Class RegisterActivity that I want send the datas. router = conexion.getApiService(); super.onActivityResult(requestCode, resultCode, data); if(resultCode == RESULT_OK && requestCode == REQUESCODE){ pickUri = data.getData(); user_Img.setImageURI(pickUri); String photo = pickUri.toString(); File file = new File(photo); RequestBody reques = RequestBody.create(MediaType.parse(“multipart/form-data”),file);…

Details

How to include work station id in entity framework database first model connection string dynamically?

I have a project that uses entity framework data model(.edmx) in it’s data layer.I want to add work station id in connection string to store it during create log in database. This is what I do: var d = new PresentModelConnectionString(); string connectionString = d.Database.Connection.ConnectionString; string lastCharacter = connectionString.Substring(connectionString.Length – 1, 1); if (lastCharacter ==…

Details

How to stop Captcha causing the occasional white screen of death?

Drupal 8.7 site with Captcha/recaptcha is causing a white screen of death error. The website encountered an unexpected error. Please try again later. TypeError: Argument 2 passed to Drupal\captcha\Service\CaptchaService::insertCaptchaElement() must be of the type array, null given, called in /data/it/www/web/modules/contrib/captcha/captcha.module on line 223 in Drupal\captcha\Service\CaptchaService->insertCaptchaElement() (line 66 of modules/contrib/captcha/src/Service/CaptchaService.php). It looks to me like $captcha_placement…

Details