Fixed asset upload is not working with / or -

Hoffi

Well-known member
Affected version
2.2 RC1
I started to use the asset upload in my AddOns and its not working if I want to use the / in the asset tag, do have all images inside one combined directory, or even to use a - to prefix the folder.

Is this a bug, or are these some limitations? at least it would be great if a / would be allowed.

for instance this is not working:

HTML:
<xf:assetuploadrow name="image_url" asset="cv6/setting" label="{{ phrase('cv6_setting_image') }}"
                value="{$setting.image_url}" explain="{{ phrase('cv6_setting_image_explain') }}"
                placeholder="path/to/image.gif" class="cv6--ce-imagepreview" data-xf-init="cv6AssetImage" />

And it is not related to the javascript I am loading.
It sends this error:

uploaderror-2020.09.19-11_19_17.png

Remark: I am using the AWS S3 Plugin.
 
It is quite unlikely that we will support slashes but perhaps supporting hyphens is reasonable.

Either way, we can probably make the error message here more clear as to what the issue is.
 
Yes, that would also help. Or, maybe even harder an Error in the AdminCP instead of rendering like "Not allowed Characters" if they are used in this value would be the best, if it is not planned to use them.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.0 RC2).

Change log:
Support hyphens in asset type names and throw a clearer error if the type name isn't valid
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom