[Archivesspace_Users_Group] XLink value question for DO Instance File Version
Majewski, Steven Dennis (sdm7g)
sdm7g at eservices.virginia.edu
Wed Feb 15 17:04:07 EST 2017
It’s the spaces in the URL which are causing it to fail converting the string to a URI.
[2] pry(main)> u=URI( 'http://abc/def ghi xxx.pdf' )
URI::InvalidURIError: bad URI(is not URI?): http://abc/def ghi xxx.pdf
from /usr/local/var/rbenv/versions/jruby-1.7.24/lib/ruby/1.9/uri/common.rb:176:in `split'
So the template falls thru to the final case of just displaying the string, instead of the ‘link_to’ block above:
https://github.com/archivesspace/archivesspace/blob/master/public/app/views/records/_file_versions.html.erb#L12
Try URL encoding the spaces as “%20” : that should work.
I also tested on 1.4.2. That link above in current release shows the same code in the template.
I don’t know if it checks for valid URL anywhere else in current release.
Perhaps the edit form should take care of checking and encoding when saved.
Will look into this further.
— Steve.
On Feb 15, 2017, at 4:02 PM, Kari R Smith <smithkr at mit.edu<mailto:smithkr at mit.edu>> wrote:
Screenshot attached. Yes, full URLs.
Kari R. Smith
Digital Archivist and Program Head for Born-digital Archives
Institute Archives and Special Collections
Massachusetts Institute of Technology Libraries, Cambridge, Massachusetts
617.253.5690 smithkr at mit.edu<http://mit.edu/> http://libraries.mit.edu/archives/ @karirene69
From: archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org> [mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org] On Behalf Of Majewski, Steven Dennis (sdm7g)
Sent: Wednesday, February 15, 2017 4:01 PM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>>
Subject: Re: [Archivesspace_Users_Group] XLink value question for DO Instance File Version
Are they full http:|https: URLs ?
( I know there’s some code that, if there is no scheme in the URLs, assumes they are file: URLs and prepends that scheme. That, and some Windows specific backslash hacks should probably be redone. )
Can you give example of the URLs and maybe a screen shot ?
— Steve.
On Feb 15, 2017, at 3:54 PM, Kari R Smith <smithkr at mit.edu<mailto:smithkr at mit.edu>> wrote:
Hi all,
I’m having trouble getting my URLs in the File Version data field to be an actual hyperlinked URL and could use some help.
My XLink Actuate is OnLoad
XLink Show is embed
The behavior I would like to have is for there to be a hyperlink to the digital object but the full URI not display to the user.
I feel like this is something I should be able to do but am having trouble even after trying several combinations of the two XLink values.
We are in version 1.4.2 so would be as happy to hear that this is a known version issue. If that’s the case, what would be my ideal values for my ideal behavior in version 1.5.3?
Thanks very much!
Kari R. Smith
Digital Archivist and Program Head for Born-digital Archives
Institute Archives and Special Collections
Massachusetts Institute of Technology Libraries, Cambridge, Massachusetts
617.253.5690 smithkr at mit.edu<http://mit.edu/> http://libraries.mit.edu/archives/ @karirene69
_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org<mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
<URLnoLink_FileVersion.JPG>_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org<mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20170215/3dc707ae/attachment.html>
More information about the Archivesspace_Users_Group
mailing list