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.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on April 16, 2025, 12:13