upload xml file

asked 2014-10-15 07:13:47 +0800

drive55555 gravatar image drive55555
1 1

I use Version 7.0.2. When I upload xml file, and use the media.getStreamData() and media.getByteData() will have problem. I want to get the file InputStream and byte[] to calculate the file size and save file. Please help me to solve this Problem. Thanks.

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-10-17 22:44:23 +0800

Darksu gravatar image Darksu
1991 1 4

Hello drive55555,

You can use the command InputStream.getChannel().size()

For a complete example please look at the following url:


Best Regards,


link publish delete flag offensive edit

answered 2014-10-27 06:05:47 +0800

drive55555 gravatar image drive55555
1 1

Hi Darksu

But i use the media to get file in the viewmodel. I get the InputStream by media.getStreamData(). It will be error on xml file. The png file is ok.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2014-10-15 07:13:47 +0800

Seen: 5 times

Last updated: Oct 27 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More