Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Gary Smith 27 posts 47 karma points
    Aug 11, 2010 @ 00:35
    Gary Smith
    0

    member uploaded image

    I have a need for authenticated members in a specific group to be able to upload an image (or multiple) from the front end.  Basically, they are adding pictures of places they are documenting in the system.  I have a custom user control that tracks some basic information and I could, in theory do it via my own code, but I would like to get it into the cms system in a proper way.

    So I need to be able, in a user control, upload a file via the umbraco way, and retrieve the path to that image (plus ID I guess) so I can drop that information into my own table for what we need. 

    Under media we have a folder heirchy for this, so we would also need to specific the folder that it will be dropped into (virtual folder that is, not real)

    Is this possible?  Any pointers?

     

  • Sascha Wolter 615 posts 1101 karma points
    Aug 11, 2010 @ 11:10
    Sascha Wolter
    0

    Hi Gary,

    If I understand you correctly you want to create a user control to be put on the front end that allows users to upload images, these images will then be added to the media library so they are then part of the Umbraco system, and in addition you need to add some info about the uploaded image into a custom table?

    I have recently posted my methods for creating a media item und uploading the file to the correct directory here:
    http://our.umbraco.org/forum/developers/extending-umbraco/11519-Add-Generic-Properties-to-Document-using-documentService-web-service

    For your purposes you would also need to save the information to your custom table once the media item has been created. Note: the directory name in the media folder is determined by the Id of the fileUpload property for that media item.

    Hope that helps,
    Sascha

  • Gary Smith 27 posts 47 karma points
    Aug 11, 2010 @ 16:20
    Gary Smith
    0

    Sascha,

    I found something similar right after posting the question.  The one I found was regarding posting of user images to their profile, and works a little more closely to what I want to accomplish.I think I was just searching for the wrong thing the first time.  Anyway, thanks for the follow up.

Please Sign in or register to post replies

Write your reply to:

Draft