Enhance task export_csv: address Drupal config where media file url is not included in JSON serialization of media#1030
Open
jefferya wants to merge 2 commits into
Open
Conversation
…ess mjordan#1025 Some Islandora sites don't respond with a url in field_media_document, field_media_video_file, field_media_audio_file, field_media_file, etc., during a request to node//media?_format=json. Not reproducible on the Islandora Starter site.
d092505 to
4c67da5
Compare
…g after each media file export
4c67da5 to
533d790
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to Github issue or other discussion
#1025
What does this PR do?
Enhances the export_csv task by:
Add alternate method to find media file url via the
entity/file; address export_csv task not finding media #1025. Some Islandora sites don't respond with a media file url property in the field_media_document, field_media_video_file, field_media_audio_file, field_media_file, etc., sections of the JSON response during a request tonode/{id}/media?_format=json. Not reproducible on the Islandora Starter site.Reduces noise in the workbench log by only testing if the export directory exists during initialization instead of each time a media is downloaded thus reducing workbench.log messages indicating "Path "export_file_directory" ("export_files") already exists."
What changes were made?
Enhances the export_csv task by:
node/{id}/media?_format=jsonAPI then checks theentity/fileAPI.How to test / verify this PR?
media file url
a. should work against the islandora.sandbox.ca where media file url is part of the
node/{id}/media?_format=jsonAPIb. should download files on the Drupal site configured such that the media file url is only exposed by the
entity/fileAPIexport_csv task: workbench log output should only have one message for the following cases (not one for each media file downloaded)
a. test config without
export_file_directoryb. test config with
export_file_directorypointing to new directoryc. test config with
export_file_directorypointing to an existing directorySample config