Alfresco / alfresco-sdk-samples

Alfresco SDK
Apache License 2.0
73 stars 82 forks source link

[custom-content store] Can't create a cm:content type without specifing file type in name filed #12

Open DonDonDon97666 opened 3 years ago

DonDonDon97666 commented 3 years ago

May you help me, thanks. I followed the sample code, it's truly success, but when testing i found this exception. { "error": { "errorKey": "framework.exception.ApiDefault", "statusCode": 500, "briefSummary": "03160101 Failed to open stream onto channel: \n accessor: ContentAccessor[ contentUrl=minio://2021/4/16/6/26/7197a6ea-74ae-4ebc-8558-2c9826c31f4c.bin, mimetype=null, size=0, encoding=UTF-8, locale=en_US]", "stackTrace": "For security reasons the stack trace is no longer displayed, but the property is kept for previous versions", "descriptionURL": "https://api-explorer.alfresco.com", "logId": "d06e8c9c-8ac7-4b83-bf34-fd1e468888d2" } }

This occurs when i create a cm:content type without specifing file type in name filed, for example , it will work when i create a node like this : { "name": "test.ppt", "nodeType": "cm:content" } but won't work like this and the exception is : { "name": "test", "nodeType": "cm:content" } { "error": { "errorKey": "framework.exception.ApiDefault", "statusCode": 500, "briefSummary": "03160101 Failed to open stream onto channel: \n accessor: ContentAccessor[ contentUrl=minio://2021/4/16/6/26/7197a6ea-74ae-4ebc-8558-2c9826c31f4c.bin, mimetype=null, size=0, encoding=UTF-8, locale=en_US]", "stackTrace": "For security reasons the stack trace is no longer displayed, but the property is kept for previous versions", "descriptionURL": "https://api-explorer.alfresco.com", "logId": "d06e8c9c-8ac7-4b83-bf34-fd1e468888d2" } }

DonDonDon97666 commented 3 years ago

contentstore.zip

this is my code