Jump to content

[Solved] How To Preserve Filename or File Extension in Product Attachment?


Recommended Posts

I found this is a little bit buggy since every file I attached into a product will have no extension. For example, I attached a PDF file into a product but after I downloaded this attached file, it will be no .pdf extension, just the filename.

Is there any solution to this issue?

I hope someone could help me.

Link to comment
Share on other sites

what is the name of the file you upload, try one without spaces, I must admit that I haven't worked with file downloads before but I will take a look if you report that the problem is also with any file (with the filename that doesn't contain spaces)

Link to comment
Share on other sites

Now I got it.
To preserve the file extension, we should include the extension into the Title. For example, if we attach a PDF file, then the attachment title should have a .pdf extension, not merely a title name.
It doesn't matter the file of the title contains space or not, as long as it has an extension.
Case closed.

Link to comment
Share on other sites

  • 1 year later...
  • 2 years later...

old but here is a solution for 1.6:

 

Change the file -> admin/themes/default/template/controllers/products/associations.tpl

 

Search <option value="{$attach.id_attachment}">{$attach.name}</option>

and change $attach.name to $attach.file_name

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...