-
Notifications
You must be signed in to change notification settings - Fork 71
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
Media (created through Drupal) don't appear in Fedora #1079
Comments
Been digging through this, and there's a lot going on here Inconsistencies in Gemini indexing:Binary content in fedora:// vs public:// have their RDF indexed differently, and as a consequence, are indexed in Gemini differently. What you're seeing is expected behaviour w/r/t your Gemini index, but that doesn't make it good behaviour. What really needs to happen is we start using the Fedora spec's external content features. Then things in and out of Fedora will get treated more consistently. Triplestore indexing from Fedora is bustedThtat'd at least help you confirm things without having to manually traverse Fedora, parsing RDF as you go. I'm updating to newest on a bunch of things and am testing the install now with https://github.com/Islandora-CLAW/Alpaca/tree/fix-triplestore-indexing. Finding the Fedora representation is a PITAWe've got some tickets out there to bubble the mapping in Gemini up into the html as well as link headers. Making all of that transparent (for folks with the right permissions) will dodge the rigmarole of looking things up in Gemini.
So... yeah... apologies for the mine field 😟 I'm patching up the triplestore indexing and working my way back to the actual issue. We'll get it sorted out. |
Yeah I was going to say that we got the fcrepo-camel and fcrepo-camel-toolbox working against Fedora 5, so we should be able to resolve the triplestore stuff. Could possibly also work towards getting the API-X stuff working too, but I'm not sure what is required there. |
So, @dannylamb , what would it take to get the Media of a fedora:// file indexed in Fedora? Our metadata folks really want to start attaching some PREMIS 3 metadata (e.g. preservationLevel) to files, and the corresponding Media entity seems the logical place to do is since file entities aren't fieldable. I'm willing to try my hand at it if I can get pointed in the right direction. |
@whikloj I can get |
@seth-shaw-unlv I would have to pull the thread further, but https://github.com/Islandora-CLAW/Crayfish/blob/master/Milliner/src/Controller/MillinerController.php#L99 is the place to start. That's the route that's for media for files that live in Fedora. Media whose files don't live in Fedora actually use the |
What are "media whose files don't live in Fedora"? I have a derivative in Drupal ("2 - Service File") that was automatically generated when I uploaded an original file. It's clearly saved "in Drupal" as in, the URL of the file is at /sites/default/files/2019-04 and if I go to that directory on the filesystem, the file is there. But the field, according to drupal, is a "file_media_image" which, is configured to use Fedora (flysystem) storage. Indeed - if I don't like the thumbnail and decide to replace it, (remove the existing file, add a new file) then the file I add gets stored in Fedora instead of Drupal. So because the Service File was added through the backend, you can trick the field storage to make it actually save in Drupal? Weird flex. Could we instead have "Image (Fedora)" and "Image (Drupal)" as two separate Media types, so that a user can predict/expect/understand the file storage behavour? |
@rosiel I'm threading the needle on Drupal behaviour there. Configuring the field controls which filesystem is used when uploading through the UI. But derivatives are generated using the REST api, which accepts a drupal uri in the Content-Location header. You can, however, configure where derivatives are deposited by configuring the action for that derivative. So by splitting out Media types you'll get the front end. And then you can configure the backend for both media types with Context/Actions to lock down where the derivatives are placed. If that seems like better default behaviour to folks, we can do that. Would just mean a PR to |
As an alternative, could we alter the file upload form to include a file-descriptor dropdown? Then a user could select if a file is destined for Drupal or Fedora at that point. Making a duplicate set of Media types makes me cringe and I would like to avoid it if possible. |
@seth-shaw-unlv A dropdown in the file widget would be a welcome improvement regardless. |
Ok, so I've managed to fix the triplestore for Fedora indexing, and looking at this further, am receiving 403's from Milliner when trying to hit
Looking like maybe now the |
So I've gone ahead and taken the liberty of updating to use external content properly through the Fedora API. I'm pushing up some branches now, but will have to update the fcrepo role to deploy some config to get external content going. I'll let you know when it's ready, but nonetheless.... From Gemini we've got all the files indexed, regardless of what filesystem they use:
And if you curl the fedora_url for the service file, you get redirected:
And if you curl the "describedby" link header, you get the metadata:
🍾 |
Resolved via Islandora-Devops/islandora-playbook#100 |
I created a Drupal Repository Object, then a Media, and uploaded a File.
The Object and the File are in Gemini and so I know they're in Fedora.
The Media object (with whatever metadata attached) does not appear to be in Fedora.
(I queried the Gemini table, for lack of a better way to tell).
Interestingly, if I do something that generates derivatives, then the resulting Media objects are in Fedora (and Gemini) though the files are not. (media/4 was generated from media/3)
Here's another weird thing. The "original file" media object is in the triplestore.
The text was updated successfully, but these errors were encountered: