Uploading Images

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

Re: [northernpenguin] Uploading Images

By Dave - September 28, 2009

Hi northernpenguin,

No, there's nothing built in that would do that.

I'm trying to think of some work arounds. You could have a pulldown field that loaded it's values from the uploads table. It would work so well if you needed to get height and width for images though. But it could give you a pulldown of previous uploads to selected from.

Would that work? Or not quite?
Dave Edis - Senior Developer
interactivetools.com

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