We have a website I'm converting from classic ASP and am trying to put into Umbraco. The key feature of the website is for members to be able to upload photos.
For starters, I'm torn as to whether I should do the photos as a Media node or a Content node with a link to the image's location on disk?
Members submit a description, category, and brand with their photos. Categories and brands are represented as nodes in my content tree. So I need to figure out the best way to represent those to the members as well. I'm thinking of doing it as a drop down with indented category names as the text and the node id as the value.
I'm not sure what the best way is to link the photo with the member? Umbraco separated the users from the members so I'm assuming I don't pass the member id when creating the node. Create a custom field to store it?
Is there a way to associate the photos with the member in the admin? I'd want to do this if somebody uploaded a bunch of garbage. It would be easier to find/delete them by just going through the member's photos.
You can create a custom Media Type, e.g. Member Photo with a requred field of Member Id. When creating documents of this type via the API, simply pass in the currently logged in Member Id for this new field.
also you can add a new property to your member type called avatar (or something similar) of type MediaPicker. Then you can create the media item when they upload the picture and save its id on the member property. So you also can see it in the umbraco backoffice.
Or you can link the media item and the member with the relations api.
The relations API looks like the winning ticket. You will likely have to create a custom dashboard or section in the back office to select all media by member id.
Thoughts on How to Set Up Member Photos?
We have a website I'm converting from classic ASP and am trying to put into Umbraco. The key feature of the website is for members to be able to upload photos.
For starters, I'm torn as to whether I should do the photos as a Media node or a Content node with a link to the image's location on disk?
Members submit a description, category, and brand with their photos. Categories and brands are represented as nodes in my content tree. So I need to figure out the best way to represent those to the members as well. I'm thinking of doing it as a drop down with indented category names as the text and the node id as the value.
I'm not sure what the best way is to link the photo with the member? Umbraco separated the users from the members so I'm assuming I don't pass the member id when creating the node. Create a custom field to store it?
Is there a way to associate the photos with the member in the admin? I'd want to do this if somebody uploaded a bunch of garbage. It would be easier to find/delete them by just going through the member's photos.
Hi Sam,
You can create a custom Media Type, e.g. Member Photo with a requred field of Member Id. When creating documents of this type via the API, simply pass in the currently logged in Member Id for this new field.
Thanks Matt, that is one of the options. I'm curious if there is then a way to display all of the photos for a specific member in the backend?
Hi Sam,
also you can add a new property to your member type called avatar (or something similar) of type MediaPicker. Then you can create the media item when they upload the picture and save its id on the member property. So you also can see it in the umbraco backoffice.
Or you can link the media item and the member with the relations api.
Regards, David
Thanks David. I thought about that, but users can upload more than one image.
Relations API, that's a new one I haven't heard of. Will check it out.
The relations API looks like the winning ticket. You will likely have to create a custom dashboard or section in the back office to select all media by member id.
Umbraco Relations API
http://umbraco.com/follow-us/blog-archive/2012/12/7/getting-to-know-umbraco-relations.aspx
is working on a reply...