Solved

uploading a file using nsIDOMFile to a BLOB field in database with servlets

Posted on 2008-10-21
1
485 Views
Last Modified: 2013-12-07
Hi i want to upload a JPG image file in a BLOB field in database. Since <input type="file" /> does not generate full path in firefox3 so i am using getAsBinary(); method of nsIDOMFile to send image's data in raw binary format to the servlet.
Now how to convert this string received as request.getParameter("image"); in the servlet to the inputstream so that it can be sent to the database using preparedstatement.setBinaryStream() method.
0
Comment
Question by:thunderwonder
1 Comment
 
LVL 2

Accepted Solution

by:
thunderwonder earned 0 total points
Comment Utility
I think this question is too complex for the experts here & i haven't got much time so i'll withdraw it and look somewhere else
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now