You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was getting a new type of slide ready and i found that my input fields were getting prefixed with the media source url. In this case i created a few custom fields to enter some YouTube ID's. I called those fields 'video1', 'video2' and 'video3'. I entered just the YouTube ID but they came out of the export.json as '/uploads/dQw4w9WgXcQ'.
After a bit of searching i found out that if the field key contains 'video', 'logo' or 'image' the value will be prefixed with the Media Source URL by this bit of code:
The better way seems to check the actual field type of the slide type to determine if the prefix need to be added.
So i just creating this issue like a todo. Maybe I will give it a go... but if somebody feels the urge, feel free 😉
The text was updated successfully, but these errors were encountered:
gerbenvandekraats
changed the title
bad way to determine if a media source prefix is needed
Bad way to determine if a media source prefix is needed
Apr 24, 2023
I was getting a new type of slide ready and i found that my input fields were getting prefixed with the media source url. In this case i created a few custom fields to enter some YouTube ID's. I called those fields 'video1', 'video2' and 'video3'. I entered just the YouTube ID but they came out of the export.json as '/uploads/dQw4w9WgXcQ'.
After a bit of searching i found out that if the field key contains 'video', 'logo' or 'image' the value will be prefixed with the Media Source URL by this bit of code:
digitalsignage/core/components/digitalsignage/model/digitalsignage/digitalsignage.class.php
Line 418 in d1c4088
The better way seems to check the actual field type of the slide type to determine if the prefix need to be added.
So i just creating this issue like a todo. Maybe I will give it a go... but if somebody feels the urge, feel free 😉
The text was updated successfully, but these errors were encountered: