Restrict files upload by extension

  • Posts: 19
  • Thank you received: 0
5 years 4 months ago #308307

-- HikaShop version -- : 4.1.0
-- HikaMarket version -- : 3.0.2
-- Joomla version -- : 3.9.5
-- PHP version -- : 7.1
-- Error-message(debug-mod must be tuned on) -- : No error message

How can we restrict file uploads by extension for different group users?

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
5 years 4 months ago #308343

Hello,

Just like the "max_file_size", you can add an option "allowed_extensions" to the array structure in order to override the default setting.
When you're uploading an image, the HikaShop configuration setting for image extension is used.
And when you're uploading a file (not an image), it's the HikaShop configuration setting for the file extensions.

So with the new trigger that I will add into HikaMarket, you will also have the possibility to add your custom behavior.
But, I do like the idea of having new "Access Level options" in HikaMarket for these upload restrictions ; so I think that I will work on them for a future release too !

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 19
  • Thank you received: 0
5 years 4 months ago #308500

Great.
Do you have an idea when this option could be ready?
Regards !!

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
5 years 4 months ago #308632

Hello,

We are working on some developments regarding payment methods and subscriptions ; we also have some tasks for HikaMarket but I admit that I don't have any schedule for the implementation of your feature request.
The trigger implementation is mostly done, just need a validation test. The "max file size" per access level require a bigger development and have various impacts in the product ; specially if we want to have one setting or several in order to make a distinction between product files and product images.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.057 seconds
Powered by Kunena Forum