Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Antti Väyrynen
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 457c7372
authored
Aug 31, 2013
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix uploadservlet stream
1 parent
723eeb02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
code/MoyaWeb/src/fi/codecrew/moya/servlet/UploadServlet.java
code/MoyaWeb/src/fi/codecrew/moya/servlet/UploadServlet.java
View file @
457c737
package
fi
.
codecrew
.
moya
.
servlet
;
package
fi
.
codecrew
.
moya
.
servlet
;
import
java.io.ByteArrayInputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.io.PrintWriter
;
...
@@ -110,7 +111,7 @@ public class UploadServlet extends HttpServlet {
...
@@ -110,7 +111,7 @@ public class UploadServlet extends HttpServlet {
String
type
=
request
.
getParameter
(
"type"
);
String
type
=
request
.
getParameter
(
"type"
);
if
(
type
.
equals
(
"userimage"
))
{
if
(
type
.
equals
(
"userimage"
))
{
logger
.
debug
(
"Uploading userimage for user {}"
);
logger
.
debug
(
"Uploading userimage for user {}"
);
UserImage
userimage
=
userbean
.
uploadImage
(
userbean
.
findByEventUserId
(
destId
),
contenttype
,
imagedata
,
filename
,
description
);
UserImage
userimage
=
userbean
.
uploadImage
(
userbean
.
findByEventUserId
(
destId
),
contenttype
,
new
ByteArrayInputStream
(
imagedata
)
,
filename
,
description
);
utilbean
.
convertImage
(
userimage
.
getUser
());
utilbean
.
convertImage
(
userimage
.
getUser
());
}
else
if
(
type
.
equals
(
"mapimage"
))
{
}
else
if
(
type
.
equals
(
"mapimage"
))
{
eventmapbean
.
sendImage
(
destId
,
imagedata
);
eventmapbean
.
sendImage
(
destId
,
imagedata
);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment