Monday, 26 June 2023

Azure blob storage access

 https://i.stack.imgur.com/nIxsK.png

access azure blob storage file to angular for language file simple steps


step1.Replace local storage file name with azure blob url.

step2.give container level access instead of private.otherwise  no data found error.

step3. CROSS issue reslove it by allowing inside blob cross settings. see this link

 imports: [
    HttpClientModule,
    CommonModule,
    TranslateModule.forRoot({
      loader: {
        provide: TranslateLoader,
        useFactory: translateLoaderFactory,
        deps: [HttpClient],
      },
    }),
  ],


export function translateLoaderFactory(httpClient: HttpClient) {
    //  return new TranslateHttpLoader(httpClient,"./assets/i18n/", ".json");
    return new TranslateHttpLoader(httpClient,
      "https://xxxx.blob.core.windows.net/translations/",".json")
   }

No comments:

Post a Comment

7 Common mistakes in Dot Net — You can avoid

  There are many common mistakes made during .NET (ASP.NET, .NET Core) development, which affect performance, security, and code… Code Crack...