Addon.xml Settings - How Do I Reliably Return The Url Of An Uploaded File?

Using the file setting in addon.xml allows users to upload a file/image/etc using the Elfinder.

How do we get the file as a URL, or at least a URi? Calling registry just returns the relative path to the file that doesnt include higher folders, and it varies on accuracy.

For example, after uploading an image at "/images/companies/2/img.jpg" while in "all stores" mode, the registry (setting) for this field is saved as "companies/2/img.png". This is because in all stores there is a higher starting root of "/images"

Now if i do the same thing but in a storefront instead of "all stores" mode, the Elfinder root is now "/images/companies/2/". Uploading the file still goes to "/images/companies/2/img.jpg", but now the registry (setting) for this field is saved as "img.png".

I dont think CS is doing image pairing for this type of upload, and i didnt see any "generate a url with this image" functions that dont require image/object type or id.

Its pretty easy to do something like this if the setting comes from specific store:

$image = Registry::get('config.current_location') . '/images/companies/' . $company_id . '/' . Registry::get('addons.something.image');

But its not very accurate if someone puts it rando in "all stores" mode (ie, setting an image in an addon for all storefronts). Any ideas?

Not normally a bumper, but i tried a few more things to no avail. Has no one ever ran into this in an addon "file" type option? I feel like there is a function im missing that translates a config path to URi. Or that elfinder doesnt "get it".

How does Simtech add their name to all the plugins they develop? Which attribute in addon.xml is used for that?

Hello

How does Simtech add their name to all the plugins they develop? Which attribute in addon.xml is used for that?

This is section:

SoftSolid
https://cs-cart.pl


SoftSolid
biuro@cs-cart.pl
https://cs-cart.pl

Best regards
Robert.

Thank you..!!