Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,148,634 members, 7,801,831 topics. Date: Friday, 19 April 2024 at 01:10 AM

Image In File Upload Does Not Show Why? Help Pls - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Image In File Upload Does Not Show Why? Help Pls (1308 Views)

Hi Guys..... I Need A Plug-in For File Upload On Wordpress / Simple Wp-tutorial To Increase File Upload Space On Wordpress Blog / How Do I Remove White Backgroung Of My Image In Flash (2) (3) (4)

(1) (Reply) (Go Down)

Image In File Upload Does Not Show Why? Help Pls by pagolina: 6:31pm On Jul 15, 2009
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!!!
Re: Image In File Upload Does Not Show Why? Help Pls by bug24(m): 6:33pm On Jul 15, 2009
kindly post the source code of the form here.
Re: Image In File Upload Does Not Show Why? Help Pls by kehers(m): 6:38pm On Jul 15, 2009
Dats probably coz u didnt specify d correct enctype for d form,
here:

<form enctype="multipart/form-data" action="__URL__" method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
Re: Image In File Upload Does Not Show Why? Help Pls by yawatide(f): 7:53pm On Jul 15, 2009
poster:
Listen to kehers, esp with opening FORM tag part wink
Re: Image In File Upload Does Not Show Why? Help Pls by biggjoe(m): 9:05pm On Jul 15, 2009
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.
Re: Image In File Upload Does Not Show Why? Help Pls by nitation(m): 9:18pm On Jul 15, 2009
@ 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
Re: Image In File Upload Does Not Show Why? Help Pls by Nobody: 11:03pm On Jul 15, 2009
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.
Re: Image In File Upload Does Not Show Why? Help Pls by Nobody: 6:20am On Jul 16, 2009
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?
Re: Image In File Upload Does Not Show Why? Help Pls by kehers(m): 4:37pm On Jul 16, 2009
The hidden max_size (as webdezzi noted) is just to take care of things on the client side. It is similar to using javascrript to prevalidate before the content goes to the server for server validation. Of course, we know it is possible the max_file_size hidden input is edited (increased) by duplicating the html code somewhere else, so it is essential the size is as well validated on the server side.
PHP for example stores the size of the uploaded file in $_FILES['filename']['size'] so u can easily validate against dat on the server side.

<?php
,
if($_FILE['name']['size'] > 1024*1024*3){ //max of 3MB
//bounce
}
,
?>
I dont know for other languages sad
Re: Image In File Upload Does Not Show Why? Help Pls by biggjoe(m): 5:46pm On Jul 16, 2009
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:
pagolina:

but when image are uploaded i can only see the path not the image

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.
Re: Image In File Upload Does Not Show Why? Help Pls by kehers(m): 5:55pm On Jul 16, 2009
@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.
Re: Image In File Upload Does Not Show Why? Help Pls by onyengbu1(m): 6:55pm On Jul 16, 2009
kehers:

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.

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.
Re: Image In File Upload Does Not Show Why? Help Pls by okine4real: 5:31pm On Feb 20, 2013
Available

Re: Image In File Upload Does Not Show Why? Help Pls by Z8(m): 1:37am On Feb 21, 2013
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
Re: Image In File Upload Does Not Show Why? Help Pls by dj187: 8:43am On Jun 30, 2013
Test
Re: Image In File Upload Does Not Show Why? Help Pls by Alescondy: 12:14pm On Jun 30, 2013
pls help me check dis out also nd tek me d prob @www.fanztweak.tk

(1) (Reply)

Website Designer Needed Urgently For A Freelance Job In Abuja / New Client Chat / What Changes And Improvements Do You Want To See In Nairaland In 2014

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 19
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.