logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
judy at Web2Market  
#1 Posted : Wednesday, December 21, 2022 10:13:24 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 286

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
Go to Catalog-->Images
Do not have any restrictions set on file types under security
Click Upload... either image or file
Click to upload in dropzone. Window opens with *.Any in the file type dropdown
No files show, only folders
Change to All Files (*)
Click on a file to upload
Nothing happens

This works OK if you have restricted the file types under Security

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

nadeem  
#2 Posted : Friday, December 23, 2022 6:36:51 AM(UTC)
nadeem

Rank: Advanced Member

Groups: Administrators, Developers, Registered, HelpDesk, Authorized User, Admin, System
Joined: 10/11/2018(UTC)
Posts: 109

Thanks: 17 times
Was thanked: 18 time(s) in 18 post(s)
I am able to reproduce the issue. Although, we are showing the validation message "Only images/files are accepted" but I think we don't need to apply any restriction when Any is selected as a valid image/file type or have to show the related message in this case. Any ways, I have this registered as a bug to be looked into.

If you want to remove the restriction when no file type is selected (Any), you can apply the following quick fix:

Open the file /Areas/Admin/Controllers/AssetsController.cs and locate the following line inside ImageUpload/FileUpload post actions:

Code:
FileHelper.IsExtensionValid(safeFileName, AbleContext.Current.Store.Settings.FileExt_Assets))


and replace with

Code:
FileHelper.IsExtensionValid(safeFileName, AbleContext.Current.Store.Settings.FileExt_Assets) || imageModel.ValidFiles.Equals("Any"))


Thank you!
thanks 1 user thanked nadeem for this useful post.
judy at Web2Market on 12/27/2022(UTC)
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.