2

As I'm using Spring /Rest, my service should have annotation with @produces .. i don't know the mime type for .rpm , '.swix' ,'.swi' for my browser download these files.

Azhagu Surya
  • 132
  • 1
  • 1
  • 17

1 Answers1

2

In this case, I'd suggest you send data in the binary format for that you can use application/octet-stream. Look at very closely subject.

slesh
  • 1,902
  • 1
  • 18
  • 29
  • Thanks.It works fine for '.swi' and '.swix' correct file is downloaded. But it doesn't work for'.rpm' file. After downloading the .rpm , junk data only downloaded .Can you please suggest a solution. – Azhagu Surya Sep 07 '17 at 04:46
  • Can you please tell me., Can we download a '.rpm' file using 'servletoutputstream' like the same way to download the other files? or we need any conversion ..? – Azhagu Surya Sep 07 '17 at 06:44
  • "After downloading the .rpm , junk data only downloaded" - explain please, what does it mean – slesh Sep 07 '17 at 08:07
  • 1
    I suppose we can. It should work for any kind of files because it transports row bytes – slesh Sep 07 '17 at 10:28
  • yeah it's working fine when hitting request 'url' . but it doesn't supported by swagger .thanks a lot . Code wise working fine . – Azhagu Surya Sep 07 '17 at 12:01