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

remove duplicates in an sorted array

  using System; public class HelloWorld {          public static void Main(string[] args)     {         int[] ar={2,2,3,3,4,6,6};          C...