Persisting an uploaded image against a content type

We're working on a custom widget that gives a step-by-step guided approach for a member to create a piece of content. Instead going to the lengths of writing a custom content type the data will get feed into a standard Article behind the scenes, with a few extra pieces of data going into a custom lookup table we implemented (think of that as our own version of Extended Attributes that works across any content type).

One of the fields we'll ask a user to complete is a 'poster' image for the article.. I can do that easily enough using $('#mylink').glowUpload, and have my prototype successfully uploading the image.. I can see it appear in the communityserver.components.multipleuploadfilemanager folder of filestorage.

I realise this is a temporary location & it needs persisting against the Article I'll create, however is there any way I can I make the system do this without having it referenced in the body HTML of the Article content?

Parents
  • For anyone wanting to do the same, I think I've got a half-way decent idea.

    Basically, once the file upload has completed, I can call some Velocity which edits the Article temporarily.. when I update the Article, I can append the image URL to the body HTML (at this point it it's the temporary location), and when it saves the article the Verint system will move the image to a permanent location.

    I can grab the new location from the body of the updated Article, then update it again to remove the image.

    It's not ideal, and creates unnecessary versions of the Article, but I can't see a way around that, and most people won't care about (or see) the versions.

Reply
  • For anyone wanting to do the same, I think I've got a half-way decent idea.

    Basically, once the file upload has completed, I can call some Velocity which edits the Article temporarily.. when I update the Article, I can append the image URL to the body HTML (at this point it it's the temporary location), and when it saves the article the Verint system will move the image to a permanent location.

    I can grab the new location from the body of the updated Article, then update it again to remove the image.

    It's not ideal, and creates unnecessary versions of the Article, but I can't see a way around that, and most people won't care about (or see) the versions.

Children