0

Currently, I am working on Opencart.There is a inbuid feature for upload the file and link with the products. It's supporting .pdf,.doc and .xls file format. But, it's giving error while uploading the .docx or .xlsx format file.

How can I modified the existing functionality. So, I can upload the those file format.

FYI : I am using Opencart Version 1.5.5.1

Thanks

1 Answers1

0
  1. Login to admin
  2. Go to System > Settings.
  3. Click on 'Edit' button of your store.
  4. Select Server tab.
  5. Add the required file extensions in Allowed File Extensions: option.
  6. Add the corresponding mime types in Allowed File Mime Types: field.
  7. Save. That's it.

Here are the correct mimetypes (What is a correct mime type for docx, pptx etc?):

.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

Have a nice day :) !!

Community
  • 1
  • 1
Sankar V
  • 4,110
  • 5
  • 28
  • 52