Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add file checksum controller #15

Closed
mjordan opened this issue Jul 21, 2021 · 1 comment
Closed

Add file checksum controller #15

mjordan opened this issue Jul 21, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@mjordan
Copy link
Owner

mjordan commented Jul 21, 2021

Necessary for mjordan/islandora_workbench#34.

@mjordan mjordan added the enhancement New feature or request label Jul 21, 2021
@mjordan mjordan self-assigned this Jul 21, 2021
@mjordan
Copy link
Owner Author

mjordan commented Jul 21, 2021

This is the JSON returned when a file is created by create_file():

{'fid': [{'value': 1574}], 'uuid': [{'value': '3a9500ee-6269-42e3-bd08-9aabf2bacfcb'}], 'langcode': [{'value': 'en'}], 'uid': [{'target_id': 1, 'target_type': 'user', 'target_uuid': '7459b795-c0ee-4975-ae01-a2fb4658d970', 'url': '/user/1'}], 'filename': [{'value': 'IMG_5083.JPG'}], 'uri': [{'value': 'public://2021-07/IMG_5083.JPG', 'url': '/sites/default/files/2021-07/IMG_5083.JPG'}], 'filemime': [{'value': 'image/jpeg'}], 'filesize': [{'value': 1910313}], 'status': [{'value': False}], 'created': [{'value': '2021-07-21T05:35:43+00:00', 'format': 'Y-m-d\\TH:i:sP'}], 'changed': [{'value': '2021-07-21T05:35:43+00:00', 'format': 'Y-m-d\\TH:i:sP'}]}

The uuid in the above JSON is for the file.

Within create_islandora_media(), we need to GET the media using its mid, and the returned JSON contains the file's UUID.

Note: confirm that files stored in Fedora return the checksum (they appear to).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant