Uploading Images

5 posts by 2 authors in: Forums > CMS Builder
Last Post: September 29, 2009   (RSS)

Hi All!

I have a client who will be re-using his images & pdf files in more than one location on the website. However, we are trying to avoid uploading the same image/file to CMSB multiple times.

Is there a way to select existing images/files from the /upload/ diirectory if it already exists?

Thanx!
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [Dave] Uploading Images

Dave: yes, that would work. How would I go about doing that?
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [Dave] Uploading Images

Dave: I tried your suggestion. However, there are some issues:

a. The only semi-useful fields are filePath & urlPath (& thumb version);
b. I would prefer to allow the view of the image vice a dropdown list of filenames.

Maybe an interim step: select filenames, then view those that were selected?

Is there any way to do this?

Thanx Dave!
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [northernpenguin] Uploading Images

By Dave - September 29, 2009

Hmm, there's no easy way, or built in way.

But you could try this. Create a separator field below your image field with "HTML" selected for the separator type and this for the content:

<tr>
<td valign="top">Image Preview</td>
<td id="imagePreview">

<script>
var fieldname = 'myimage';
$('[name=' +fieldname+ ']').change(function() {
$('#imagePreview').html('<img src="' +this.value+ '" />');
});
</script>

</td>
</tr>


Change "myimage" to the name of your upload field. The above code is javascript that uses jQuery.

Note that this isn't really something we support, but maybe this will work?

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com