Open Closed

Upload image property in Application - Continuity of Ticket #8602 #8605


User avatar
0
Navneet@aol.com.au created
  • ABP Framework version: v9.0.2
  • UI Type: MVC
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..) / MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Continuity of question: https://abp.io/support/questions/8602/RequireProofKeyForCodeExchange-PKCE-and-Manual-Ltd#answer-3a175694-eb09-cbb6-b1b4-0619fd9428fb

Hi Abp Team,

As requested, I have created a separate ticket for this:

Could you please help me with the code to add upload to save images in db and show them in the Application Index Page, what is the correct type to save the image (basically it's an Icone), I tried to create a similar in ABP suite, but it creates a Guid property for image 🤷‍♂️

ConfigureOpenIddict(openIddict = {
    openIddict.ConfigureApplication(spp =>
        spp.AddOrUpdateProperty( ----> to show upload and show image?
          //or
        spp.AddOrUpdateProperty(
        //or
        spp.AddOrUpdateProperty(
        
        "ApplicationIcon"

Many thx, Navneet


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

    hi

    You can add a new property to OpenIddictApplication entity by https://abp.io/docs/latest/framework/architecture/modularity/extending/customizing-application-modules-extending-entities

    The new property can be string, you can upload an image to your application. Then, set the URL or image for this new property.

    ObjectExtension system doesn't support file upload yet

    Thanks.

  • User Avatar
    0
    Navneet@aol.com.au created

    hi

    You can add a new property to OpenIddictApplication entity by https://abp.io/docs/latest/framework/architecture/modularity/extending/customizing-application-modules-extending-entities

    The new property can be string, you can upload an image to your application. Then, set the URL or image for this new property.

    ObjectExtension system doesn't support file upload yet

    Thanks.

    Could you please help me here with the code, as the below will not show any upload option

    ConfigureOpenIddict(openIddict = {
        openIddict.ConfigureApplication(spp =>
            spp.AddOrUpdateProperty<String>( ----> to show upload and show image?
     
            "ApplicationIcon"
    

    I appreciate your kind help

    Thanks, Navneet

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    AddOrUpdateProperty doesn't support file upload yet

    The new property can be string, you can upload an image to your application. Then, set the URL or image for this new property.

    : )

  • User Avatar
    0
    Navneet@aol.com.au created

    Hi Maliming,

    So it needs to be divided into 2 parts, upload the image to the database and then update the Application's custom string property. Conceptually I understand, however if you have any code help, please share

    Thanks, Navneet

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can refer to these documents to implement it, I don't have ready code

    https://abp.io/docs/latest/framework/infrastructure/blob-storing https://abp.io/docs/latest/framework/architecture/domain-driven-design/application-services#working-with-streams

    You can download the source code of AccountPromodule to check the code of User avatar upload

    Thanks.

Made with ❤️ on ABP v9.2.0-preview. Updated on January 08, 2025, 14:09