X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c436da861845723ab18f56dba96052cf2569e539..0dffc025de9ebc7a54596e1018a589a6f5b8a03e:/services/api/app/models/blob.rb diff --git a/services/api/app/models/blob.rb b/services/api/app/models/blob.rb index 5decd77261..c8a886554f 100644 --- a/services/api/app/models/blob.rb +++ b/services/api/app/models/blob.rb @@ -1,5 +1,13 @@ class Blob + def initialize locator + @locator = locator + end + + def empty? + !!@locator.match(/^d41d8cd98f00b204e9800998ecf8427e(\+.*)?$/) + end + # In order to get a Blob from Keep, you have to prove either # [a] you have recently written it to Keep yourself, or # [b] apiserver has recently decided that you should be able to read it