«Home

Image In File Upload Does Not Show Why? Help Pls

Am working with dreamwerver and i have a form, on it i also have file upload field to upload image, but when image are uploaded i can only see the path not the image (the image does not show in dreamwerver or even on preview).

I want the image to show in a box as part of the form contect, how do i achieve that?

your contribution will go a long way!!!

Avatar
Newbie
13 answers

pls help me check dis out also nd tek me d prob @www.fanztweak.tk

0
Avatar
Newbie

looking through tye source code you provided I havent see where you tried to display the uploadex file. all I see an input tag of type 'hidden' which obviously wont display anything. best I can say is use PHP. you receive it in the $_FILES superglobal then you then use it as the image source in your img tag in html.hope that helps

0
Avatar
Newbie

yea, you are very right but his post is still not clear to me, and he has to do more than posting once and disapper to get answers from people in here.

0
Avatar
Newbie

@biggjoe

If the enctype attribute of the form tag is not specified as "multipart/form-data", the file input field interpreted as normal text input field and it is just the path to the image that is posted.

0
Avatar
Newbie

if only the poster will come and explain his problems better.

I dont think he is having problems with uploading the photos, check the line below:

What i can deduce from his post is that he is having problems of DISPLAY, what I cant fathom is whether the display problem is about displaying the uploaded photo or displaying the photo for the user to see before uploading and thats why I said, if only he can come and explain better.

0
Avatar
Newbie

It is only in perl cgi (outdated now) that i know how to get filesize before upload starts. But with php 5, i think there is a way to solve that problem -

but i have not tried it out yet, any ideas?

0
Avatar
Newbie

well Nitation, such user will be wasting his time when the file size is like 10Mb

he will need to wait for 30mins+ only to see a message like "you cant upload files larger than 25kb"

that trick helps get the filesize to the serverside code before uploading starts, that way, d programmer can issue such warning before uploading begins.

As long as the programmer does not rely on it for restricting large file uploads since clientside can be fooled

But i think biggjoe actually addressed some issues the poster may be facing.

i guess d poster wanted a way to display d image uploaded.

0
Avatar
Newbie

@ Kehers

What will happen If I decide to increase the hidden field file size to the following:

<input type="hidden" name="MAX_FILE_SIZE" value="30000000000000000000" />

Note the added zeros.

I will suggest you process the max_file_size in your processing script to avoid disk space exhaustion.

Regards

- nitation

0
Avatar
Newbie

Assuming you have successfully incorporated  an image upload script in an 'insert server behaviour' created by   Dreamweaver, you will have to also include the full path of the picture where you want to display it. Dreamweaver cannot do it on its own.

e.g: lets say you uploaded the image in a folder named 'photos' and your recordset is named 'rs_files' and the field in the DB that holds your filename is 'pics'

then to display the picture which you uploaded to the 'photos folder,

the line that will do it will look exactly like this,

<img src="photos/<?php echo $row_rsfiles['pics']; ?>"/>

Then again, something makes me think you are talking about image preview box. i.e the one that shows you the picture you are uploading before uploading it.

If you are talking about that, then its javascript that will do it for you.

0
Avatar
Newbie

Dats probably coz u didnt specify d correct enctype for d form,

here:

0
Avatar
Newbie

kindly post the source code of the form here.

0
Avatar
Newbie
Your answer
Add image

By posting your answer, you agree to the privacy policy and terms of service.