This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

iiui awan

  • ****
  • 118 posts
facing error while uploing image
« on: April 16, 2022, 03:32:13 AM »
facing error while uploing image


062715bdef49d916a21...955b.jpg_.webp has an invalid extension. Valid extension(s): png, gif, jpg, jpeg.

*

MB Themes

Re: facing error while uploing image
« Reply #1 on: April 16, 2022, 11:49:13 AM »
Osclass does not support webp images to be uploaded.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

iiui awan

  • ****
  • 118 posts
Re: facing error while uploing image
« Reply #2 on: April 17, 2022, 08:41:24 PM »
will you please add option to upload that file

*

MB Themes

Re: facing error while uploing image
« Reply #3 on: April 19, 2022, 04:50:32 PM »
No plans for that right now. It is not expected casual user will have webp images.
Anyway you should be able to update hardcoded list of extensions somewhere in t_preference table.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Marked as best answer by frosticek on April 20, 2022, 03:29:18 PM
*

mwindey

  • *****
  • 475 posts
Re: facing error while uploing image
« Reply #4 on: April 20, 2022, 12:20:13 PM »
This was easy to do....

First download backup of your database file and copy/paste for safe editing.

Search for:
Code: [Select]
('osclass','allowedExt','png,gif,jpg,jpeg','STRING'), and replace with:
Code: [Select]
('osclass','allowedExt','png,gif,jpg,jpeg,webp','STRING'),
Then clear database and upload edited file (make sure you uncheck Enable Foreign Key Field Checking)

OR more easy is open PhpMyAdmin - go to t_preference and edit table
osclass /allowedExt/ png,gif,jpg,jpeg with png,gif,jpg,jpeg,webp

In oc-includes/osclass look for file mimes.php and search for line:
Code: [Select]
  'gif' => 'image/gif',
underneath that line add:   
Code: [Select]
'webp' => 'image/webp',
Save file/Upload to server and your done.
« Last Edit: April 20, 2022, 12:30:55 PM by mwindey »

*

MB Themes

Re: facing error while uploing image
« Reply #5 on: April 20, 2022, 03:29:37 PM »
@mwindey
Thanks for help, forgot about mime ;)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

mwindey

  • *****
  • 475 posts
Re: facing error while uploing image
« Reply #6 on: April 21, 2022, 02:41:03 PM »
@MB Themes,
I suspected it and that's why I made it clearer...Anyway it was your comment that made me think about it  :) :)