Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Andreas Müller
Download link for library document without mime type
28 de febrero de 2011 7:20
Respuesta

Andreas Müller

Ranking: Junior Member

Mensajes: 47

Fecha de incorporación: 26 de enero de 2011

Mensajes recientes

The document library of my portal organization contains a folder with templates for e.g. letter (.doc), fax (.doc) and travel expenses (.xls). Nothing special so far.
A document library display which uses the template folder as root folder offers all these template documents for download. It not only displays the mime type of the document but also offers to start a suitable application (MS Word, MS EXcel or Open Office for example) to open the download. OK, that's what you expect as standard behaviour.
We also want to offer download of particular documents from content. For this purpose I have created links with the content editor and used the 'search server' option to pick my document during link creation. When I display this straightforward piece of content and click that link I can download the document but the mime type seems missing. Therefore the download can neither save the file with the correct extension nor offer to open it with a suitable application. Although the downloaded file is correct and complete and can be opened with MS Office from disk afterwards (guessing the missing document type) this is not what I expect here.
Any ideas what I am doing wrong here and how to fix the problem? I have seen mime type errors in this forum but they look resolved long ago. I am surprised that such an error should show up in the 6.0.5 Tomcat bundle running on MySQL.
Jonas Yuan
RE: Download link for library document without mime type
28 de febrero de 2011 18:51
Respuesta

Jonas Yuan

Ranking: Liferay Master

Mensajes: 993

Fecha de incorporación: 26 de abril de 2007

Mensajes recientes

Hi Andreas,

Which version are you using?

How to reproduce the issue?

Thanks

Jonas yuan
Andreas Müller
RE: Download link for library document without mime type
1 de marzo de 2011 2:29
Respuesta

Andreas Müller

Ranking: Junior Member

Mensajes: 47

Fecha de incorporación: 26 de enero de 2011

Mensajes recientes

Hi Jonas,

I am using 6.0.5.
According to my experience the problem can be easily reproduced using the folowing steps:
1.) Make a fresh installation with the Liferay-6.0.5-tomcat bundle on Windows (7)
2.) Log in as Bruno admin and open the control panel
2.) Add a folder to the document library of the Liferay community and upload any Excel document to it using the classic uploader
3.) Create a web content (without structure and template for simplicity) and add a link to it by using the "search server" function of the editor to pick that Excel document from the library
4.) Display that content on Bruno's public page and click the link
5.) You will be offered a download with mime-type 'octet-stream'

Thanks Jonas! During creation of that list I have figured out that the problem only occurs after uploading the docs using the classic uploader! Uploads using the newer upload look fine!

This looks like a bug in the classic uploader to me.
Hitoshi Ozawa
RE: Download link for library document without mime type
1 de marzo de 2011 20:15
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7949

Fecha de incorporación: 23 de marzo de 2010

Mensajes recientes

Just tested it myself and it seems the Classic file uploader is stripping the file extension from the file.

I checked the folder using WebDAV and the file uploaded with Classic uploader didn't have file extension while the file uploaded with the new uploader did.

Should file a jira on this.
Andreas Müller
RE: Download link for library document without mime type
3 de marzo de 2011 0:54
Respuesta

Andreas Müller

Ranking: Junior Member

Mensajes: 47

Fecha de incorporación: 26 de enero de 2011

Mensajes recientes

Hitoshi Ozawa:
Should file a jira on this.

Done. The jira id is 15571
Hitoshi Ozawa
RE: Download link for library document without mime type
3 de marzo de 2011 15:30
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7949

Fecha de incorporación: 23 de marzo de 2010

Mensajes recientes

I'm sorry. I just retested this and found the fault was that I wasn't putting in the file extension in the name field correctly. The link is working for me after correctly entering the title (filename).
Adjunto

archivos adjuntos: fileUpload.jpg (26,1k)
Andreas Müller
RE: Download link for library document without mime type
4 de marzo de 2011 2:59
Respuesta

Andreas Müller

Ranking: Junior Member

Mensajes: 47

Fecha de incorporación: 26 de enero de 2011

Mensajes recientes

Hitoshi Ozawa:
I'm sorry. I just retested this and found the fault was that I wasn't putting in the file extension in the name field correctly. The link is working for me after correctly entering the title (filename).

No reason to feel sorry.
I checked that: It is correct that the file type recognition in the download link depends on the document title added (It must contain the file extension). Document type recognition during download from the document library portlet does not depend on this same title. IMHO this is highly misleading and a bug anyway.
Hitoshi Ozawa
RE: Download link for library document without mime type
7 de marzo de 2011 20:41
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7949

Fecha de incorporación: 23 de marzo de 2010

Mensajes recientes

Document type recognition during download from the document library portlet does not depend on this same title. IMHO this is highly misleading and a bug anyway.


Another fine thin line between specification and a bug. emoticon
Alexander Chow
RE: Download link for library document without mime type
16 de marzo de 2011 7:26
Respuesta

Alexander Chow

Community Moderator

Ranking: Liferay Master

Mensajes: 518

Fecha de incorporación: 19 de julio de 2005

Mensajes recientes

This is now fixed in trunk per LPS-14793 and LPS-15571.

Alex
Hitoshi Ozawa
RE: Download link for library document without mime type
16 de marzo de 2011 15:50
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7949

Fecha de incorporación: 23 de marzo de 2010

Mensajes recientes

This is now fixed in trunk per LPS-14793 and LPS-15571.


Great!
jonathan lutz
RE: Download link for library document without mime type
18 de mayo de 2011 14:39
Respuesta

jonathan lutz

Ranking: New Member

Mensajes: 2

Fecha de incorporación: 18 de mayo de 2011

Mensajes recientes

Alexander Chow:
This is now fixed in trunk per LPS-14793 and LPS-15571.

Alex


I hate to revive an old thread, but I am on version 6.0.6-20110225 and I am still encountering this issue. Is there a fix for this?

Thanks!
Hitoshi Ozawa
RE: Download link for library document without mime type
18 de mayo de 2011 16:29
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7949

Fecha de incorporación: 23 de marzo de 2010

Mensajes recientes

FYI: According to the LPS, it's suppose to be fixed in 6.1.0 so the fix isn't included in the 6.0.6.