lenya-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Hartmann <andr...@apache.org>
Subject Re: asset shown directly instead of preview
Date Tue, 08 Jan 2013 13:05:44 GMT
Hi Rudolf,

Am 24.12.12 15:40, schrieb Rudolf Korhummel:
> I found out that this is related to :
> http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/publication/DocumentImpl.java?r1=907008&r2=1305170&pathrev=1305170&diff_format=h
>
>
> It  was your commit rev=1305170 Do you remember the reason for this
> change ?
> The old version seems to work.

sorry for the late reply. The reason was as follows:

In a project, we are using the DefaultDocumentBuilder with an empty 
extension, i.e. document URLs have the form /foo/bar instead of 
/foo/bar.html. Without the change in question, this results in image 
URLs being generated without extensions as well, e.g. <img 
src="/foo/myimage"/>. When an image URL is requested without the 
extension though, Lenya shows the "Media Document" page, but we want the 
image to be displayed.

IMO the cleanest way would be not to use extensions but the HTTP 
"Accept" header to control what media type to return. I will look into 
that. I'm not sure if all browsers send a sufficiently specific Accept 
header, though.

Thanks for bringing it up and reverting my change!

-- Andreas



> Am 19.12.2012 um 11:55 schrieb rudolf.korhummel@uniklinik-freiburg.de:
>
>> Hi lenya devs,
>>
>> at the 2.1 branch the asset is shown directly instead of the preview
>> when I
>> switch form the site tab to the edit tab.
>> In every other situation when a preview is requested the asset is shown
>> now. This seems to be related to the latest commits.
>>
>> Best
>>
>> Rudolf
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
>> For additional commands, e-mail: dev-help@lenya.apache.org
>>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Mime
View raw message