474,045 Members | 43,439 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I upload images from a basic client?

Good morning.

I would like to allow a user to browse his local directories, choose an
image (probably .jpeg) file, and upload it to the server (a servlet). The
same functionality that online datiing agencies use to let people save their
photograph with their profiles. (My application is an online Want Ads.)

I feel that this must be possible within a minimal client (without a JVM)
using nothing more than JavaScript, but I'll be damned if I can find how.

Would one of you more experienced JavaScript people please point me in the
right direction.

Thank you,
Ron.

Jul 23 '05 #1
5 1444

"Ron Brennan" <rb******@magma .ca> wrote in message
news:pr******** ************@ma gma.ca...
Good morning.

I would like to allow a user to browse his local directories, choose an
image (probably .jpeg) file, and upload it to the server (a servlet). The
same functionality that online datiing agencies use to let people save their photograph with their profiles. (My application is an online Want Ads.)

I feel that this must be possible within a minimal client (without a JVM)
using nothing more than JavaScript, but I'll be damned if I can find how.

Would one of you more experienced JavaScript people please point me in the
right direction.

Thank you,
Ron.


http://www.jguru.com/faq/view.jsp?EID=160

Jul 23 '05 #2

"Murray" <pa***@SPAMoffS PAMMER.optusSP4 Mnet.com.au> wrote in message
news:40******** *************** @news.optusnet. com.au...

"Ron Brennan" <rb******@magma .ca> wrote in message
news:pr******** ************@ma gma.ca...
Good morning.

I would like to allow a user to browse his local directories, choose an
image (probably .jpeg) file, and upload it to the server (a servlet). The same functionality that online datiing agencies use to let people save

their
photograph with their profiles. (My application is an online Want Ads.)

I feel that this must be possible within a minimal client (without a JVM) using nothing more than JavaScript, but I'll be damned if I can find how.
Would one of you more experienced JavaScript people please point me in the right direction.

Thank you,
Ron.


http://www.jguru.com/faq/view.jsp?EID=160


No Javascript is necessary btw.
Jul 23 '05 #3
Much appreciated; thank you Murry.

"Ron Brennan" <rb******@magma .ca> wrote in message
news:pr******** ************@ma gma.ca...
Good morning.

I would like to allow a user to browse his local directories, choose an
image (probably .jpeg) file, and upload it to the server (a servlet). The
same functionality that online datiing agencies use to let people save their photograph with their profiles. (My application is an online Want Ads.)

I feel that this must be possible within a minimal client (without a JVM)
using nothing more than JavaScript, but I'll be damned if I can find how.

Would one of you more experienced JavaScript people please point me in the
right direction.

Thank you,
Ron.


Jul 23 '05 #4
"Ron Brennan" <rb******@magma .ca> wrote in message news:<pr******* *************@m agma.ca>...
Good morning.

I would like to allow a user to browse his local directories, choose an
image (probably .jpeg) file, and upload it to the server (a servlet).


I don't believe this is so much of a JavaScript matter (depending on
requirements). Use the HTML form element, <input type="file">, and
post the form. How it is dealt with at the server varies by language.
I know it is relatively easy in PHP, and very difficult in ASP.
Jul 23 '05 #5
Yes, that was the method described and expanded on at the link Murry
provided. It also provides a Browse button, which I also need. Thanks.
"Saint Jude" <th************ **@hotmail.com> wrote in message
news:d9******** *************** ***@posting.goo gle.com...
"Ron Brennan" <rb******@magma .ca> wrote in message

news:<pr******* *************@m agma.ca>...
Good morning.

I would like to allow a user to browse his local directories, choose an
image (probably .jpeg) file, and upload it to the server (a servlet).


I don't believe this is so much of a JavaScript matter (depending on
requirements). Use the HTML form element, <input type="file">, and
post the form. How it is dealt with at the server varies by language.
I know it is relatively easy in PHP, and very difficult in ASP.

Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4490
by: Adrian Hill | last post by:
Hi all, I can upload plaintext files to the server fine, but when I try to upload a pdf, it tells me that the file is damaged and could not be repaired. The file is uploaded to the correct place on the server, but is significantly larger (almost twice as large) as the original file before upload. Viewing the uploaded files in a web page (download.php) or accessing the files directly gives the same message, so I believe the problem is
4
2435
by: NohaKhalifa | last post by:
Dear All; I'm developing a web site and i need to make adminisration for this site it's a site for Real Estates . But I don't need the administration to be online .. I want them to fill data and images offline and then send them online... but i have a problem regarding the images i want it to be sent to the web site So i want if there is a possible way to fill data offline and
1
2780
by: BW | last post by:
I am creating an upload/download function for an extranet site. Files will be uploaded to directory based upon the users login and associated project. The function works as long as I use "c:\Temp" as the directory. When I use any other hard coded directory or even Server.MapPath() the upload function fails and returns the error: "Exception has been thrown by the target of an invocation." Once I change the root directory to "c:\Temp",...
3
3073
by: Pitcairnia | last post by:
The basic purpose of the site is for authenticated users to post event listings, which often include photographs. The user is faced with a page where they can insert all of the information about the event in a typical form with textboxes, drop down lists, etc. On this page there are also 4 file upload controls where the user can select 0 to 4 images on their file system for inclusion in the event listing. On submit, the images (if any)...
1
2735
by: joshbeall | last post by:
Hi All, If I drop a form onto my page that allows file uploads, I know well enough how to handle the file upload in the server side via PHP. However, I have a question: when my browser actually *sends* a binary file (e.g., an image), does it encode it somehow for the upload? Or does it simply send a raw bytestream? The reason I am asking is that I am in the process of transferring some
4
9110
by: SammyBar | last post by:
Hi all, I wonder is it possible to upload the content of an <imgfield to a server. The content of the <imgwas downloaded from a web site different from the one it should be uploaded. The image file should not be saved locally before uploading. It should not be visible any <input type=file on the form. How can it be done? I'm working on a project where client javascript requests an image server to generate dynamic images. The client...
3
23166
acoder
by: acoder | last post by:
How to Upload a File in Coldfusion Use the cffile tag for uploading files to the server. Note that allowing people to upload files is fraught with danger and only trusted users should be allowed to upload files. Checks should be made to make sure that only allowed file types are uploaded. The Client-Side First of all, let us deal with the client side. This assumes some knowledge of HTML.
9
3920
by: Steve Poe | last post by:
I work for an animal hospital trying to use PHP to store an animal's dental x-rays to a file server. I can browse for the xray on the local desktop computer then click "Upload Image". This works fine. The doctors want fewer steps to follow. So, it was asked if I can configure the browser to load/submit the image 'xray.tif' each time they click "Upload Image" instead of the doctor/animal technician having to look for for dental x-ray...
4
1933
by: samatair | last post by:
Hi I have being working on a form. The form allows 5 image files to be uploaded with other user details. All the 5 image files are uploaded at the same time (with a single submit button click). The uploaded images are resized to thumbnails 120x120 version and 600x400 version. Maximum 1 MB size image files are allowed to upload. I have tested with this in my local server using XAMPP for Windows and its working fine. In my local server...
0
10546
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10337
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11602
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
11141
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
10310
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8698
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6652
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
5416
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3971
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.