inveniosoftware / inveniosoftware/invenio
Cannot attach files to an updated record
Open
@topless is already working on this.
Since May 7, 2020.
Type: bug
- Dominant language
- Python
- Stars
- 663
- Forks
- 295
- PR merge metrics
- No merged PRs in 30d
Description
I'm using Invenio 3.2. I create a new record using the REST API, POST method:
POST https://127.0.0.1:5000/api/records/
Say the new record gets id 1. Now I can attach files to the new record:
PUT https://127.0.0.1:5000/api/records/1/files/my_file.txt
The new file gets attached correctly. Later, I update my record using the PUT method:
PUT https://127.0.0.1:5000/api/records/1
Update is successful, but attached files disappear. If I try again to attach a file, I get a 404 error:
PUT https://127.0.0.1:5000/api/records/1/files/my_file_2.txt
{'message': 'The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.', 'status': 404}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.