When multiple document types are contributed to the frameio service, the Frameio.BindOperation operation is not provided with the allowed document type selected in the Web UI during the binding of a Folder.
How to reproduce:
- Set up a Nuxeo instance with the nuxeo-frameio addon installed and configured with a OAuth provider as described in documentation https://doc.nuxeo.com/nxdoc/nuxeo-frameio/
- contribute to the frameio service with custom allowed document types:
<require>org.nuxeo.ecm.frameio.service.contrib</require> <extension target="org.nuxeo.ecm.frameio.service.FrameioService" point="config"> <config> <allowed> <!-- <doctype>File</doctype> --> <doctype>Video</doctype> <doctype>Picture</doctype> </allowed> <uploadable> <mimetype>image/gif</mimetype> <mimetype>image/jpeg</mimetype> <mimetype>image/png</mimetype> <mimetype>image/tiff</mimetype> <mimetype>image/svg+xml</mimetype> <mimetype>image/bmp</mimetype> <mimetype>image/x-ms-bmp</mimetype> <mimetype>video/mpeg</mimetype> <mimetype>video/mp4</mimetype> <mimetype>video/quicktime</mimetype> <mimetype>video/x-ms-wmv</mimetype> <mimetype>video/x-msvideo</mimetype> <mimetype>video/x-flv</mimetype> <mimetype>video/x-m4v</mimetype> <mimetype>video/web</mimetype> <mimetype>video/quicktime</mimetype> <mimetype>video/webm</mimetype> </uploadable> </config> </extension>
- bind a Folder using the Picture document type:
- HTTP request sent:
POST /nuxeo/api/v1/automation/Frameio.BindOperation {"params":{"teams":"af6ea457-333f-43bb-92b8-371c6e8399f7","doctype":"Picture","name":"Publish video to Nuxeo"},"context":{},"input":"95be87ad-5bc3-47c4-8f7a-0b363c4d558b"}
- unbind the folder because I entered the wrong document type
- bind the same folder:
- HTTP request sent:
POST /nuxeo/api/v1/automation/Frameio.BindOperation {"params":{"teams":"af6ea457-333f-43bb-92b8-371c6e8399f7","doctype":"Picture","name":"Publish video to Nuxeo"},"context":{},"input":"95be87ad-5bc3-47c4-8f7a-0b363c4d558b"}
Expected result: Video is set to field doctype of property frameio-custom-action:actions
Actual result: Picture is set to field doctype of property frameio-custom-action:actions
{ "entity-type": "document", "repository": "default", "uid": "95be87ad-5bc3-47c4-8f7a-0b363c4d558b", "path": "/default-domain/workspaces/Frame.io/Project Nuxeo 20240112 V", "type": "Folder", "state": "project", "parentRef": "a672c13e-679d-4b2b-8286-691b2694d21e", "isCheckedOut": true, "isRecord": false, "retainUntil": null, "hasLegalHold": false, "isUnderRetentionOrLegalHold": false, "isVersion": false, "isProxy": false, "changeToken": "11-0", "isTrashed": false, "title": "Project Nuxeo 20240112 Videos", "lastModified": "2024-01-18T04:05:39.021Z", "properties": { "frameio-custom-action:actions": [ { "teamName": "John's Team", "doctype": "Picture", "frameioOwnerId": "c1dc52e3-2dc9-4f5e-a75f-9ef6c099e755", "ownerName": "Administrator", "teamId": "af6ea457-333f-43bb-92b8-371c6e8399f7", "name": "Publish video to Nuxeo", "description": "Push to Nuxeo folder : /default-domain/workspaces/Frame.io/Project Nuxeo 20240112 V", "nuxeoOwner": "Administrator", "id": "7279a211-8488-4f44-aee1-6f303b1309cc", "secret": "OcqPtjfbM9j_iRayIT39tmjWTjv0JVylyvkLwB2vwF1WlpC9lVp6emerrapckIo-" } ], "common:icon-expanded": null, "common:icon": "/icons/folder.gif", "dc:description": null, "dc:language": null, "dc:coverage": null, "dc:valid": null, "dc:creator": "Administrator", "dc:modified": "2024-01-18T04:05:39.021Z", "dc:lastContributor": "Administrator", "dc:rights": null, "dc:expired": null, "dc:format": null, "dc:created": "2024-01-18T04:01:00.922Z", "dc:title": "Project Nuxeo 20240112 Videos", "dc:issued": null, "dc:nature": null, "dc:subjects": [], "dc:contributors": [ "Administrator" ], "dc:source": null, "dc:publisher": null, "nxtag:tags": [] }, "facets": [ "Folderish", "NXTag", "FrameioCustomAction" ], "schemas": [ { "name": "frameio-custom-action", "prefix": "frameio-custom-action" }, { "name": "common", "prefix": "common" }, { "name": "dublincore", "prefix": "dc" }, { "name": "facetedTag", "prefix": "nxtag" } ], "contextParameters": { "acls": [ { "name": "inherited", "aces": [ { "id": "Administrator:Everything:true:::", "username": "Administrator", "externalUser": false, "permission": "Everything", "granted": true, "creator": null, "begin": null, "end": null, "status": "effective" }, { "id": "members:Read:true:::", "username": "members", "externalUser": false, "permission": "Read", "granted": true, "creator": null, "begin": null, "end": null, "status": "effective" } ] } ], "permissions": [ "Write", "WriteVersion", "ReadProperties", "ReadCanCollect", "ReadSecurity", "Remove", "ReadVersion", "Read", "WriteLifeCycle", "Everything", "Moderate", "Version", "ManageLegalHold", "MakeRecord", "WriteColdStorage", "ReadChildren", "AddChildren", "Comment", "ReadLifeCycle", "RemoveChildren", "DataVisualization", "ReviewParticipant", "UnsetRetention", "Unlock", "CanAskForPublishing", "RestrictedRead", "ReadWrite", "ReadRemove", "Browse", "SetRetention", "WriteProperties", "WriteSecurity", "ManageWorkflows" ] } }
Workaround
The following steps show how to make the form work:
- unbind the folder
- bind the same folder:
- action name: delete the value in the input field and enter Publish video to Nuxeo (same value as the first bind)
- team: don't change
- document type: don't change (should be Video)
- HTTP request sent:
POST /nuxeo/api/v1/automation/Frameio.BindOperation {"params":{"teams":"af6ea457-333f-43bb-92b8-371c6e8399f7","doctype":"Video","name":"Publish video to Nuxeo"},"context":{},"input":"95be87ad-5bc3-47c4-8f7a-0b363c4d558b"}