Modified: branches/components/lib/rest.rb (3245 => 3246)
--- branches/components/lib/rest.rb 2012-12-10 10:47:28 UTC (rev 3245)
+++ branches/components/lib/rest.rb 2012-12-10 14:31:35 UTC (rev 3246)
@@ -1220,6 +1220,7 @@
description = parse_element(data, :text, '/file/description')
license_type = parse_element(data, :text, '/file/license-type')
type = parse_element(data, :text, '/file/type')
+ filename = parse_element(data, :text, '/file/filename')
content_type = parse_element(data, :text, '/file/content-type')
content = parse_element(data, :binary, '/file/content')
revision_comment = parse_element(data, :text, '/file/revision-comment')
@@ -1243,6 +1244,15 @@
end
end
end
+
+ # file name
+
+ if filename && !filename.blank?
+ ob.local_name = filename
+ else
+ ob.errors.add("Filename", "missing")
+ return rest_response(400, :object => ob)
+ end
# handle type