Skip to content

Commit

Permalink
Grab the file name from the HEAD request now that fcrepo is fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Oct 30, 2014
1 parent fda9c28 commit 27daa49
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/active_fedora/datastream.rb
Expand Up @@ -195,8 +195,7 @@ def prefix
end

def fetch_original_name_from_headers
# TODO the HEAD didn't have Content-Disposition. Could this be a Fedora bug?
m = ldp_source.get.headers['Content-Disposition'].match(/filename="(?<filename>[^"]*)";/)
m = ldp_source.head.headers['Content-Disposition'].match(/filename="(?<filename>[^"]*)";/)
m[:filename]
end

Expand Down

0 comments on commit 27daa49

Please sign in to comment.