I thought Attachment is set by default since it is download .... Should I retest with it?
Can invalid file name be caused by wrong disposition type? On Wed, Apr 12, 2017 at 6:46 PM, Sven Meier <[email protected]> wrote: > Hi, > > you have to set the content disposition too: > > response.setContentDisposition(ContentDisposition.ATTACHMENT); > > We could improve the JavaScript so it is more lenient and works without > "attachment" in the header. > > Have fun > Sven > > > > On 12.04.2017 12:32, Maxim Solodovnik wrote: > >> In case I'm setting Location as iFrame, file being downloaded is >> "download.zip" >> The file name set is also has no effect >> >> On Wed, Apr 12, 2017 at 5:12 PM, Maxim Solodovnik <[email protected]> >> wrote: >> >> Weird enough >>> I have changed the code to produce pain text file (And it is being >>> created >>> and has valid text) >>> But after "mvn clean jetty:run" same zip file is being downloaded >>> like it was cached somewhere in the browser >>> >>> On Wed, Apr 12, 2017 at 4:51 PM, Sebastien <[email protected]> wrote: >>> >>> Then, set the content type to text/html so see if the filename is correct >>>> in that case. >>>> >>>> On Wed, Apr 12, 2017 at 11:44 AM, Maxim Solodovnik < >>>> [email protected]> >>>> wrote: >>>> >>>> In case I'm setting file name to "backp.zip.html" the file is being >>>>> downloaded as <UUID>.zip >>>>> I guess "zip" is being set from content type >>>>> File name is just ignored >>>>> >>>>> On Wed, Apr 12, 2017 at 4:38 PM, Sebastien <[email protected]> wrote: >>>>> >>>>> I know, it's just to test the filename... >>>>>> >>>>>> On Wed, Apr 12, 2017 at 11:29 AM, Maxim Solodovnik < >>>>>> >>>>> [email protected] >>>> >>>>> wrote: >>>>>> >>>>>> But I need zip extension, otherwise it will be unusable .... >>>>>>> >>>>>>> On Wed, Apr 12, 2017 at 4:27 PM, Sebastien <[email protected]> >>>>>>> >>>>>> wrote: >>>> >>>>> I did the same problem recently (I still have to answer Sven about >>>>>>>> >>>>>>> this, >>>>>> >>>>>>> I >>>>>>> >>>>>>>> will do it soon) >>>>>>>> Try out changing your extension to ".html" to see if it's the same >>>>>>>> behavior, maybe it will help you to investigate further. (in my >>>>>>>> >>>>>>> case, >>>> >>>>> "csv" >>>>>>> >>>>>>>> had issue with the filename and "html" was fine) >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> -- >>>>>>> WBR >>>>>>> Maxim aka solomax >>>>>>> >>>>>>> >>>>> >>>>> -- >>>>> WBR >>>>> Maxim aka solomax >>>>> >>>>> >>> >>> -- >>> WBR >>> Maxim aka solomax >>> >>> >> >> > -- WBR Maxim aka solomax
