Connecting Tech Pros Worldwide Forums | Help | Site Map

uploading video or image file

Newbie
 
Join Date: Nov 2006
Posts: 17
#1: Nov 28 '06
Hi guys !
I have a form, in which I want users to upload either video or image . What I want to ask is how I can set it up so, that when a user tries to upload a image when there is already a video file in the video field ...the video field gets cleared out and vice versa .
Any suggestions ?
Thanks

Expert
 
Join Date: Oct 2006
Location: NC
Posts: 1,722
#2: Nov 28 '06

re: uploading video or image file


What code do you have thus far? You are going to need some server side scripting to upload files to a webserver.
Newbie
 
Join Date: Nov 2006
Posts: 17
#3: Nov 28 '06

re: uploading video or image file


Quote:

Originally Posted by AricC

What code do you have thus far? You are going to need some server side scripting to upload files to a webserver.

Hi AricC,
I am using PHP ....uploading is not a problem that part is working great. I just want to make a client side validation for this.
Thanks
Expert
 
Join Date: Oct 2006
Location: NC
Posts: 1,722
#4: Nov 28 '06

re: uploading video or image file


Where are the videos stored? You will probably want to do this in your php upload code.
Newbie
 
Join Date: Nov 2006
Posts: 17
#5: Nov 29 '06

re: uploading video or image file


Quote:

Originally Posted by AricC

Where are the videos stored? You will probably want to do this in your php upload code.

Thanks for your response.
I solved my issue.
I wanted a client side validation and Javascript "getElementById() " did the trick for me.:)

Thanks
Newbie
 
Join Date: Feb 2007
Posts: 1
#6: Feb 20 '07

re: uploading video or image file


Hi AricC,
i wana code for uploading the videofiles.i just have some minar confusion in that ..pls help me
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#7: Feb 20 '07

re: uploading video or image file


You will need some server-side code to deal with that. Do you need javascript help?
sumittyagi's Avatar
Expert
 
Join Date: Mar 2007
Location: New Delhi, India
Posts: 198
#8: Mar 5 '07

re: uploading video or image file


I have a query in uploading images.
we upload images by using <input type='file' name='abc'/> tag.

now if we want to get the size of image before submitting it(i.e. at onsubmit), then is it possible in javascript, or it could be done at server side only.
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#9: Mar 5 '07

re: uploading video or image file


In most cases, it is only possible on the server-side. In IE (not sure about IE7), you can access local files, so you can use the fileSize property. This won't work in other browsers.
Reply