Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Urgent:BLOB Separation

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

hi,
We have a form where we are storing two binary objects
BLOB ( image/gif file)
There is also a program called Multipart.java that
parses through the form and stores the parameters of the
image file like "content", "content-type",
"content-disposition" in a hash table.
Now when we have two files the problem is that the
"content" parameter is the same in case of both the files
ie I can't separate the binary streams.
To elaborate in the form the "name" parameter is "upload"
and "upload2" in two cases respectively.
There is an if - else loop so that the content in the two cases are separated. But the separation does not take place

How can we separate binary streams in the case of two
BLOB objects in a form ?
Regards



 
vik nuckchady
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when you read the information why don't you scan for the boundary header of the gif file. It is usually a header like gif98a ....
I have done an upload servlet where i use this technique to differentiate from where the file starts in the request string.
[This message has been edited by vik nuckchady (edited May 16, 2001).]
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Nilanjan B",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic