spotlight
spotlight copied to clipboard
Supported Item Type
Hi,
Could I import/upload pdf or video into spotlight by uploading a csv file? If no, how could I get them into the system.
Thanks
Hi @yanyufish, You can "import" any item that you like if you have your own indexing pipeline. Spotlight assumes an image object in several places which might not play nicely w/o some sort of representative image (e.g. widgets in pages), but you can index pretty much any document that you like w/ references to any object (and you'll be on your own wrt how to render that object to the user since Spotlight doesn't know about it).
WRT to uploading documents through the Spotlight interface, you may run into a bit more trouble because we attempt to do some processing on the image and represent it via IIIF. I'm sure something about that process wouldn't like getting a non-image object, but I have never tried it personally.
You could theoretically configure Spotlight to accept any file extension in uploads by changing Spotlight::Engine.config.allowed_upload_extensions to include your file types in an initializer in your app to see what, if anything, goes wrong after that.
https://github.com/projectblacklight/spotlight/blob/ee0f89919d675d98225433f8d1cef4ad69fc0cd7/lib/spotlight/engine.rb#L113
Hi @jkeck . Thank you. Do you know how or how hard is it to write my own indexing pipeline? I tried simply changing the line you specified. The item didn't get uploaded and nothing much new in the log. Also, does spotlight have plans on supporting other item types?