Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to post binary data?

 
Mike London
Ranch Hand
Posts: 1192
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible (how to?) upload a binary fle (like a WAR file) for another developer to examine?

Thanks.

-- mike
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you want to do this via a web service, or is an HTML form that connects to a servlet OK?
 
Mike London
Ranch Hand
Posts: 1192
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure. I was just thinking I'd upload a zip file that another user could access.

Could you explain the difference?

Thanks.

mike
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't have a preference, then a regular HTML form upload to a web app (instead of a web service that imposes constraints on both client and server) is most likely the way to go. You'd need a servlet to handle the upload on the server, but the Apache FileUpload library makes that pretty easy. Then you'd have to think about how the other user would come to know about the file, and how he could access it.

All this assumes that by "upload" you meant by HTTP - other options like FTP and WebDAV are possible, if the server supports those.
 
Mike London
Ranch Hand
Posts: 1192
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you're saying I can't just upload a file to JavaRanch for another user to download, right?

I'll post a file on a server and send the user a URL then.

Thanks.

mike

 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't realize you were asking about uploading a file to this site; I thought you were talking about a general problem and solution. But yes, you can't upload a file here - you'll need to put it somewhere else on a publicly accessible server.
 
Mike London
Ranch Hand
Posts: 1192
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic