Jump to:

7938 Posts in 1541 Topics by 945 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Attach Images to ImageDataObjectManager on Upload

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 715 Views
  • purplespider
    Avatar
    Community Member
    81 Posts

    Attach Images to ImageDataObjectManager on Upload Link to this post

    I'm using ImageDataObjectManager to all allow me to add many images to a page. I'm also using the latest version of uploadify.

    After clicking the Add button on the IDOM, and uploading the images using the Uploadify popup, I get to this state:

    The problem I have is that the images only get attached to the page if I click the Continue button, and then Close. If I just click Close, the images do not appear in the page's ImageDataObjectManager despite being uploaded.

    How can I avoid users having to remember to click Continue after uploading, and make it fine if they just click Close?

  • UncleCheese
    Avatar
    4085 Posts

    Re: Attach Images to ImageDataObjectManager on Upload Link to this post

    That's not the way it works. The upload saves the files to the filesystem and to the database, but you need to save the form to attach them to your dataobject. Plus, with IDOM, you're going to want to advance to the next form to add any extra attributes you have in your DataObject class. That's why the language on the button is "continue" and not "save." In FDOM and IDOM, you're not done adding content until you advance past the upload.

  • purplespider
    Avatar
    Community Member
    81 Posts

    Re: Attach Images to ImageDataObjectManager on Upload Link to this post

    That's a shame, I just feel it could be made a bit more user friendly, either by attaching the files on Upload, or even just having a "Warning: you need to click Continue to attach these files" message if the user just clicks Close.

    Also, there are going to be times when users do not need to advance through each file they uploaded, for example, if there are no extra attributes, or if they only wish to add extra data to a few of the files at a later date. At the moment you can click Continue then Close and all the files will be attached, but this isn't obvious, ideally, there would be a button labelled "Attach All Images".

    Minor points maybe, but I'm always thinking about how to make things as simple and obvious as possible for my clients, and a couple of little additions here will avoid the need for me to explain to them how exactly to go about adding multiple images.

    Thanks for your time.
    James

  • UncleCheese
    Avatar
    4085 Posts

    Re: Attach Images to ImageDataObjectManager on Upload Link to this post

    It's definitely a point well-taken. I'm a usability nut, too, and there are a lot of things that bug me about the DOM workflow. I think the easiest solution would be to change the event handler that starts the upload from the completion of the dialog box to the submission of the form. That way, there's no way to upload without saving the record.

    --------------------
    SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

  • UncleCheese
    Avatar
    4085 Posts

    Re: Attach Images to ImageDataObjectManager on Upload Link to this post

    OK, I've just checked in that change. That should improve the experience a bit for you!

    --------------------
    SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

  • purplespider
    Avatar
    Community Member
    81 Posts

    Re: Attach Images to ImageDataObjectManager on Upload Link to this post

    Ah, that works! Thank you very much!!!

    715 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.