Favicon won't save when I select it

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
I go to the administration settings and select my favocion image but when I save, I get the error that says that the image is not a valid filetype and it only accepts files with the .ico filetype and of course that is the kind of file that I'm trying to upload. Is there a workaround for this or another way to upload my favicon?
13 years ago
System can accept only "image/x-icon" images as favicon. Try to upload this icon in the site root directory.
13 years ago
Thanks! That worked but I really think the error message should be more descriptive because saying that its not in the correct file format for .ico doesn't really say much about the actual problem.
13 years ago
You're welcome. And really, there nothing to say but this. We don't do recognizing of file type in code, we just look at the ContentType(MIME type) of posted file.
13 years ago
nopCommerce team | d.n. wrote:
System can accept only "image/x-icon" images as favicon. Try to upload this icon in the site root directory.


Could content type "image/icon" be added to the content type validation in Modules\GlobalSettings.ascx.cs (line 296 in version 1.70 change set 54542)?

Current code:
  if (!postedFile.ContentType.Equals("image/x-icon"))

Updated code:
  if (!postedFile.ContentType.Equals("image/x-icon") && !postedFile.ContentType.Equals("image/icon"))

I have tried multiple programs to create icons and they all create icons with this content type (image/icon). This may be the source of the OP's problem as well.

.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.