Closed zzacharo closed 4 years ago
The issue comes from invenio-rdm-records
config:
RECORDS_FILES_REST_ENDPOINTS = {
'RECORDS_REST_ENDPOINTS': {
'recid': '/files',
}
}
However, the ext.py file is app.config.setdefault(k, getattr(config, k))
which does not set it because it already exists from invenio-records-files
.
If we set the above piece of config in invenio-rdm-records
it does work.
Note When doing invenio shell
on invenio-app-rdm
it does not find the mounts /api
. For that you need to go around PostFix
like app.wsgi_app.app.mounts['/api'].url_map
instead of app.wsgi_app.mounts['/api'].url_map
Pinging @fenekku cuz of knowledge/battles fought with config loading.
If this is the way to go there is a PR for it (https://github.com/inveniosoftware/invenio-app-rdm/pull/61). Feel free to merge.
https://github.com/inveniosoftware/invenio-app-rdm/pull/64 reopens the issue
Following the installation docs and at the part of attaching a file to a record, the record generated is having a link to
"files": "https://localhost/api/records/<recid>/files"
. Following this link the server responds with404
.Note Accessing the file directly through api, e.g
https://localhost/api/records/<recid>/files/my-image.jpg
works as expected.