wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Soloschenko <tobiassolosche...@googlemail.com>
Subject Re: Setting file name for FileSystemResource
Date Wed, 12 Apr 2017 06:28:46 GMT
Hi,

maybe we could add a callback method to add the name or a second parameter, because in case
of a FileSystemResource this might me a usual scenario. 

WDYT?

kind regards

Tobias

> Am 12.04.2017 um 08:25 schrieb Sven Meier <sven@meiers.net>:
> 
> Hi Maxim,
> 
> FIleSystemResource does not support a file name by default, you have to add it yourself:
> 
>  protected ResourceResponse createResourceResponse(Path path) {
>    ResourceResponse response = super.createResourceResponse(path);
>    response.setFileName(path.getFileName());
>    return response;
>  }
> 
> Regards
> Sven
> 
> 
>> On 12.04.2017 07:45, Maxim Solodovnik wrote:
>> Hello Tobias,
>> 
>> I'm trying to use FileSystemResource in latest wicket AjaxDownload
>> Unfortunately I see no easy way to set filename :(
>> 
>> It seems not to be taken from the Path passed ...
>> Could you please tell me how to do it?
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Mime
View raw message