i have created a custom usercontrol for member registration, however one of the requirements is that a member should be able to upload a profile picture of them self's.
i have managed to create all the custom properties for the users data, but cant figure out how in the world one would go about letting a user select a image from their computer and getting it saved into the media folder and linked to that user.
I'm sure there's a multitude of solutions available, here's one of many
- use asp.net upload to handle the file upload
- create media item programmatically using the uploaded image
- make sure there's a property on the member type of type media picker
- set media picker property's value to the id of the media item just created in step 2
this post is pretty outdated and after few years I'm wondering the same. So, my question, is the process of adding a profile image to a member still the same?
Adding A image when registering a member
Hi All,
i have created a custom usercontrol for member registration, however one of the requirements is that a member should be able to upload a profile picture of them self's.
i have managed to create all the custom properties for the users data, but cant figure out how in the world one would go about letting a user select a image from their computer and getting it saved into the media folder and linked to that user.
any help will be greatly appreciated
:)
Hi,
I'm sure there's a multitude of solutions available, here's one of many
- use asp.net upload to handle the file upload
- create media item programmatically using the uploaded image
- make sure there's a property on the member type of type media picker
- set media picker property's value to the id of the media item just created in step 2
Hope this helps.
Regards,
/Dirk
Thanks for the help Dirk,
Just one more question now :)
do you know where i can maybe find an example of how to create a media item programmatically?
once again, thanks for the help!
Hi Peester,
Mr nibble has an excellent code example on uploading media items at http://www.nibble.be/?p=55
Regards,
/Dirk
Hello everyone,
this post is pretty outdated and after few years I'm wondering the same. So, my question, is the process of adding a profile image to a member still the same?
Greetings
I'm wondering about the same thing. Anyone knows?
is working on a reply...