Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Determine File Name  RSS feed

 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In messing around with transfering files from a client I wrote to a server I wrote, I have been unable to find a good method for the server to recieve the name of the File I am transfering. Would I have to pass the file name accross as bytes just before sending the file? Is there another method?
Any ideas would be great.
Thanks.
 
Tim Holloway
Bartender
Posts: 18709
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For HTTP servers, I believe the name of the appropriate heade is Content-Disposition. For FTP, the FTP protocol RFC defines how the name gets passed. If you're creating your own private protocol, you can do it anyway you like.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!