Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

phonebook + picture(file) ..angular js question #2770


User avatar
0
peterlee created

Hi.

I am adding an image file to an existing person project.

Uploading the image file referenced the profile.

Angular.js

PersonService.createPerson (vm.person) .then (function () { Abp.notify.info (app.localize ('SavedSuccessfully')); $ UibModalInstance.close (); }). Finally (function () { Vm.saving = false; });

I added all the entities, but I could not pass the image name to vm.person.

So it was successful to register the image name by modifying as below.

PersonService.createPerson ({ ArticleTitlePicture: vm.uploadedFileName }). Then (function () { abp.notify.info (app.localize ( 'SavedSuccessfully')); $ UibModalInstance.close (); }). Finally (function () { Vm.saving = false; });

But, I wonder if there is a good way to register an image name like vm.person.


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    If I understand you correctly, Instead of using "vm.uploadedFileName", you can use "vm.person.uploadedFileName". In this way, you can just use PersonService.createPerson (vm.person).

  • User Avatar
    0
    peterlee created

    ooh..thank you.