Foros de discusión

Download link for library document without mime type

thumbnail
Andreas Müller, modificado hace 13 años.

Download link for library document without mime type

Junior Member Mensajes: 47 Fecha de incorporación: 26/01/11 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.
thumbnail
Jonas Yuan, modificado hace 13 años.

RE: Download link for library document without mime type

Liferay Master Mensajes: 993 Fecha de incorporación: 27/04/07 Mensajes recientes
Hi Andreas,

Which version are you using?

How to reproduce the issue?

Thanks

Jonas yuan
thumbnail
Andreas Müller, modificado hace 13 años.

RE: Download link for library document without mime type

Junior Member Mensajes: 47 Fecha de incorporación: 26/01/11 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.
thumbnail
Hitoshi Ozawa, modificado hace 13 años.

RE: Download link for library document without mime type

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 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.
thumbnail
Andreas Müller, modificado hace 13 años.

RE: Download link for library document without mime type

Junior Member Mensajes: 47 Fecha de incorporación: 26/01/11 Mensajes recientes
Hitoshi Ozawa:
Should file a jira on this.

Done. The jira id is 15571
thumbnail
Hitoshi Ozawa, modificado hace 13 años.

RE: Download link for library document without mime type

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 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).

Archivos adjuntos:

thumbnail
Andreas Müller, modificado hace 13 años.

RE: Download link for library document without mime type

Junior Member Mensajes: 47 Fecha de incorporación: 26/01/11 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.
thumbnail
Hitoshi Ozawa, modificado hace 13 años.

RE: Download link for library document without mime type

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 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
thumbnail
Alexander Chow, modificado hace 13 años.

RE: Download link for library document without mime type

Liferay Master Mensajes: 518 Fecha de incorporación: 20/07/05 Mensajes recientes
This is now fixed in trunk per LPS-14793 and LPS-15571.

Alex
thumbnail
Hitoshi Ozawa, modificado hace 13 años.

RE: Download link for library document without mime type

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
This is now fixed in trunk per LPS-14793 and LPS-15571.


Great!
jonathan lutz, modificado hace 12 años.

RE: Download link for library document without mime type

New Member Mensajes: 2 Fecha de incorporación: 18/05/11 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!
thumbnail
Hitoshi Ozawa, modificado hace 12 años.

RE: Download link for library document without mime type

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 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.