Attempt to load an update version of an existing file in the repository with a docx extension draws an error. The following message is given: "The specified file Answers to filename.docx could not be uploaded. Only files with the following extensions are allowed: jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp."
Procedure: Clicked the file to be updated in the filedepot respository and "filename.docx - Details" ajax panel appeared. Chose "New Version" from the menu bar. "Add New Version" ajax dialog box appeared. Clicked the Choose File button and browsed to the replacement file which has the same name as the original file, then clicked the upload button and got the message "The specified file Answers to xxxx.docx could not be uploaded. Only files with the following extensions are allowed: jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp."
The existing file name is the same as the updating file and docx is a permitted extension according to Filedepot settings>File Type filtering and Extension Mapping>File types to allow and Extension Mapping, however it is not an extension type listed in the error message as a permitted type.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | filedepot_uploadnewversionissue_1636082.patch | 849 bytes | _timpatrick |
Comments
Comment #1
_timpatrick commentedComment #2
_timpatrick commentedComment #3
_timpatrick commentedEdit: What is the extension mapping look like in your filedepot configuration? Can you copy and paste it here please?
Comment #4
_timpatrick commentedNote:
The "x" formats, eg: docx, xlsx, pptx have different mimetypes:
.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xltx application/vnd.openxmlformats-officedocument.spreadsheetml.template
.potx application/vnd.openxmlformats-officedocument.presentationml.template
.ppsx application/vnd.openxmlformats-officedocument.presentationml.slideshow
.pptx application/vnd.openxmlformats-officedocument.presentationml.presentation
.sldx application/vnd.openxmlformats-officedocument.presentationml.slide
.docx application/vnd.openxmlformats-officedocument.wordprocessingml.document
.dotx application/vnd.openxmlformats-officedocument.wordprocessingml.template
.xlam application/vnd.ms-excel.addin.macroEnabled.12
.xlsb application/vnd.ms-excel.sheet.binary.macroEnabled.12
So allow uploads of a docx document, the admin has to add:
docx: application/vnd.openxmlformats-officedocument.wordprocessingml.document
to the filter in the filedepot admin settings page.
Comment #5
Tokoh commentedTks _timpatrick,
The extension mapping panel contains:
---------------
jpg=jpg.gif, gif=gif.gif, bmp=bmp.gif, doc=doc.gif, docx=doc.gif, xls=xls.gif, xlsx=xls.gif
ppt=ppt.gif, pptx=ppt.gif, mpp=mpp.gif, pdf=pdf.gif, txt=txt.gif, zip=zip.gif
---------------
I added:
----------
docx: application/vnd.openxmlformats-officedocument.wordprocessingml.document
-----------
so:
--------------
jpg=jpg.gif, gif=gif.gif, bmp=bmp.gif, doc=doc.gif, docx=doc.gif, xls=xls.gif, xlsx=xls.gif
ppt=ppt.gif, pptx=ppt.gif, mpp=mpp.gif, pdf=pdf.gif, txt=txt.gif, zip=zip.gif, docx: application/vnd.openxmlformats-officedocument.wordprocessingml.document
---------------
then tried to save and got the error:
--------------
Notice: Undefined offset: 1 in filedepot_admin_settings_validate() (line 257 of /home/indoaust/public_html/ia/sites/all/modules/filedepot/filedepot.admin.inc).
----------------
But it did say that the save occurred. When I then tried to load the docx document I got the error that I first reported. My guess is that I've loaded the code from your message into the wrong place, but if then my question is: If I haven't got the correct filters set up then how was I able to load the original file?
Comment #6
_timpatrick commentedSorry instead of extension mapping I meant file type filtering!
I thought this was for the 6.x code base - I am sorry must have misread it.
So: Remove that part from the extension mapping textbox.
I am going to try to reproduce this error and come up with a solution
Comment #7
_timpatrick commentedPatch
Comment #8
Tokoh commentedThanks _timpatrick,
I manually applied the patch and it fixes the problem.
I believe that there are still problems about the way in which the two versions are presented but these are trivial in relation to the problem you fixed. These other issues may have existed in the previous D6 version, I'm new to filedepot and need to get my head around it and I'll advise these issues as soon I've got it clear about how I feel this information should be presented.
I really appreciate your responsiveness. This is a good product and it deserves being presented in its best light. Well done and thanks again.
Comment #9
_timpatrick commentedThank you :)