فتح مغلق

Upload User Profile Pictures to Azure Blob instead of storing file stream in DB #7155


User avatar
0
oncalldev@cloudassert.com خلقت

ABP Framework versionv 8.0.1

UI Type: Angular

Database System: EF Core (SQL Server)

Tiered (for MVC) or Auth Server Separated (for Angular): Auth server separated angular

Exception message and full stack trace:

Steps to reproduce the issue: https://authserver-domain-name/api/account/profile-picture/fc6acc7a-ab15-e109-325e-3a0d8602930e gets the file stream from DB. However I want to store the profile pictures in Azure Blob and store only the reference link in DB.

Could you please share the files where I need to make the change and also please share the existing logic that is used to upload the stream to DB. This is a production issue reported by customer and we need immediate assistance.

Also please mention where is the mapping of Users and their corresponding blobs?


3 إجابة (إجابات)
  • User Avatar
    0
    liangshiwei خلقت
    فريق الدعم Fullstack Developer

    Hi,

    You can use the BLOB Storing Azure Provider: https://docs.abp.io/en/abp/latest/Blob-Storing-Azure

    Also please mention where is the mapping of Users and their corresponding blobs?

    ABP uses the BLOB Storing system to save the user's profile picture, and the provider is the database by default https://docs.abp.io/en/abp/latest/Blob-Storing

    ABP uses the user ID as a profile picture file name, so there is no need to store the link in the database

  • User Avatar
    0
    oncalldev@cloudassert.com خلقت

    As you can see the performance of the call - https://localhost:44370/api/account/profile-picture-file/fc6acc7a-ab15-e109-325e-3a0d8602930e

    It takes almost 2 minutes to load the profile picture. however when we download the file from Azure blob it gets displayed in a milli-second. How can we optimize the performance of this call?

  • User Avatar
    0
    liangshiwei خلقت
    فريق الدعم Fullstack Developer

    HI,

    It's a problem, we fixed it but haven't release. https://support.abp.io/QA/Questions/7060/Profile-picture-loading#answer-3a1225fb-6601-ae64-372e-6bc30fa99eaf

Made with ❤️ on ABP v8.2.0-preview Updated on مارس 25, 2024, 15:11