Starts in:
0 DAY
3 HRS
36 MIN
33 SEC
Starts in:
0 D
3 H
36 M
33 S
Open Closed

Example upload image to Abp Blob in Angular #2167


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

Could you please give me an example how to upload image to abp blob in Angular? I see your webside only have mvc example.

The image is a property in the class "Product". I want to click the submit button to save product information with the image into db and blob.

I failed to test. I test the two property : one is IRemoteStreamContent, and another is number[]. imageContent: IRemoteStreamContent; fileContent: number[];

I used Ng Zorro upload: import { NzUploadModule } from 'ng-zorro-antd/upload';

Thanks,


3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can see this

    https://support.abp.io/QA/Questions/1174/

  • User Avatar
    0
    abpVAndy created

    Thanks for your replay.

    Could you give me example or hint how to change the Interface/Angular/Service after create by suite? Thx

    I have no idea how to change pass the image data from Angular to service api?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can use FormData to binding the ProductCreateDto

    Remove the ImageByte use ImageContent instead.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06