|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Upload File Preview
This is my first posting, I hope someone can help.
I have an upload photo facility on my school site and it works fine, however, some of the teachers want to preview the picture, to make sure they are uploading the right one. Once they have browsed for it, they want to be able to preview it. I've seen this done in Visual Basic on another site. They had a Preview Button as well as an Upload button. If you clicked the preview button it opened a new window and showed the picture. I know that I can find the name of the file with userfile['name'] but that doesn't give me the full path to the file they are getting from their machine (ie: C:mydocumentspic.jpg) so that I can simply open a new window showing their Local file, before uploading. Any help would be appreciated. |
|
#2
|
|||
|
|||
|
RE: Upload File Preview
if you're referring to after the upload form has been submitted, then you can use $_FILES['userfile']['tmp_name'] to display a preview, as that's where it is temporarily stored on the server.
if you want them to preview it prior to submission, then you should be able to use javascript to grab the value of the file/browse field. kind of seems like an odd request IMO, as they should be able to preview the image while they're browsing for it (prior to actually selecting it) |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > Upload File Preview |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|