Activities of "creosource"

Thanks this worked!

  • ABP Framework version: v4.4.0
  • UI type: Angular
  • DB provider: EF Core /
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

I am trying to download a PDF file in Angular from a call to the backend, I have tried a bunch of different methods but get the same results: "Http failure during parsing for https://localhost:44367/downloadreport/f6f8401a-26d6-0ed6-30f8-39fef69a5343" Unexpected token % in JSON at position 0 text: 772 kb

On my backend I have tried creating a controller that return RemoteStreamContent like this:

      [HttpGet]
      [Route("downloadreport/{userTestId}")]
      public async Task<RemoteStreamContent> DownloadReportAsync(Guid userTestId)
      {
         var fileDto = await _reportService.GetPDFReport(userTestId);

         MemoryStream stream = new MemoryStream(fileDto.Content);

         return new RemoteStreamContent(stream, fileDto.Name);
      }
      
I have also tried returning a File() like this:
  [HttpGet]
  [Route("downloadreport/{userTestId}")]
  public async Task<IActionResult> DownloadReportAsync(Guid userTestId)
  {
     var fileDto = await _reportService.GetPDFReport(userTestId);

     return File(fileDto.Content, "application/octet-stream", fileDto.Name);
  }

In Angular I have the following code: downloadUserTest(id: string) { this.reportService.downloadReport(id).subscribe(x => { console.log(x); }); }

Am trying to figure out what I am doing wrong, can someone help please ?

Thanks!

hi

See https://docs.abp.io/en/abp/latest/Modules/Setting-Management#angular-ui

Thanks, got it working with your link !

Hi,

I was wondering if there is a way to add additional settings to Administration/Settings pages in Angular ? Currently there are four tabs: Emailing Identity Management Lepton Theme Account

Can we add a fourth tab ?

It still doesn't work:

I login in english, then go to MVC blogging view --> I reach blogging view in english: OK, it works now, it was not before

I login in Finnish, then go to MVC blogging view --> I reach blogging view in Finnish: OK, it works now, it was not before

I login in english, I then change language to finnish after login from my Angular UI, then go to MVC blogging view --> I reach blogging view in english: KO, shoud be in Finnish

I login in Finnish, I then change language to english after login from Angular UI, then go to MVC blogging view --> I reach blogging view in english: KO, shoud be in english

Don't know if this has anything to do but in my case, when I switch the language to French and click on Logout, it does not automatically redirect to login screen. Also the text in the button is empty.

It's a different problem that will be fixed very soon apparently:

https://support.abp.io/QA/Questions/1718/Bugs-when-switch-between-Angular-and-Account-MVC-view

You can fix it already by editing the translation text of the language you are using in languge management, just need to remove {0} from ReturnToText target value, replace by "l'application" in that case.

Thanks christophe this worked great ! :)

It still doesn't work:

I login in english, then go to MVC blogging view --> I reach blogging view in english: OK, it works now, it was not before

I login in Finnish, then go to MVC blogging view --> I reach blogging view in Finnish: OK, it works now, it was not before

I login in english, I then change language to finnish after login from my Angular UI, then go to MVC blogging view --> I reach blogging view in english: KO, shoud be in Finnish

I login in Finnish, I then change language to english after login from Angular UI, then go to MVC blogging view --> I reach blogging view in english: KO, shoud be in english

Don't know if this has anything to do but in my case, when I switch the language to French and click on Logout, it does not automatically redirect to login screen. Also the text in the button is empty.

Showing 1 to 6 of 6 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11