Im in the process of creating a digital signage system using Xibo for a local primary school, so far everything is good, I found an introduction to using the API to auto upload images to Xibo which id really like to get working.
So far I have ironed out alot of the bugs but now when it attempts the upload I get access denied which it attempts 3 times with the same access denied result and I cant see any reason why this would happen. The tour i`m following is below
Access denied would imply that you haven’t granted permission for the upload to happen in the CMS for the application, or that whatever user you’ve granted that as isn’t able to upload the file type that you’re trying to use.
When you grant the application access to upload, it will do so as the user you grant it as, so all future calls from the application will appear to be from that user. Check that the user you granted the application access with has access to do whatever operations you need within the CMS directly.
Thanks for the info, as this is a test i`m using the admin user to authorise the application and as far as I know it should use the admin user to upload.
so surely as its admin I will have permission to upload, I have checked the application is authorised under the admin user
OK so I just downloaded the files, and ran them against a 1.7.5 CMS and it uploaded and replaced the files as expected:
alex@pc1500:~/Desktop/api$ python ReplaceVideo.py
Removing old media with ID 622
Adding new media with ID 4036
Video Uploaded and Layout Modified Successfully
alex@pc1500:~/Desktop/api$
Go back through and check the keys are correct, and that the layout and region ID are correct too.
Still having issues with this, I have tried a different layout and region, the only thing which I might have wrong is the mediaName, I assume this is the region name which you can add in the options on the media menu.
The region id is the ID from the raw XLF file for the layout. It’s automatically generated when the region is generated and cannot be configured. The example code shows you how to enumerate the regions of a layout and get their IDs.
The media name is the name of the media as it would appear in the library.
It makes no difference what you call the media name. It will delete the existing media item and then create a new media item with the name you specify. You should make sure whatever name you specify isn’t currently in the library.