# File lib/fog/storage/openstack/models/file.rb, line 109
        def save(options = {})
          requires :directory, :key
          options['Content-Type'] = content_type if content_type
          options['Content-Disposition'] = content_disposition if content_disposition
          options['Access-Control-Allow-Origin'] = access_control_allow_origin if access_control_allow_origin
          options['Origin'] = origin if origin
          options['X-Delete-At'] = delete_at if delete_at
          options['X-Delete-After'] = delete_after if delete_after
          options['Content-Encoding'] = content_encoding if content_encoding
          options.merge!(metadata_to_headers)

          if not @dirty
            data = service.post_object(directory.key, key, options)
          else
            requires :body
            data = service.put_object(directory.key, key, body, options)
            self.content_length = Fog::Storage.get_body_size(body)
            self.content_type ||= Fog::Storage.get_content_type(body)
          end
          update_attributes_from(data)
          refresh_metadata

          true
        end