Delete the actual binary objects with the data objects

This commit is contained in:
2012-11-03 15:05:04 +01:00
parent 2c9979f544
commit 5384e3d355
2 changed files with 37 additions and 1 deletions

View File

@@ -105,6 +105,12 @@ module RemoteStorage
end
def delete_data(user, directory, key)
object = data_bucket.get("#{user}:#{directory}:#{key}")
if binary_link = object.links.select {|l| l.tag == "binary"}.first
client[binary_link.bucket].delete(binary_link.key)
end
riak_response = data_bucket.delete("#{user}:#{directory}:#{key}")
timestamp = (Time.now.to_f * 1000).to_i