GridFS에 업다운이 있습니까?Ruby의 GridFS : 업 샘플링하는 방법?
예를 들어, 지정된 _id 및 이미 동일한 _id가있는 이미지를 저장하려면 해당 이미지를 덮어 쓰 (업데이트)하고 싶습니다. 그렇지 않으면 삽입하십시오.
grid.delete(id) # if exists
grid.put(tmp_file.read, :_id => id, :content_type => file_type)
여기에 작업시나 스크립트 참조 : http://github.com/acani/acani-sinatra/blob/master/acani.rb#L97
을 내가 코드에서 이런 짓을, 그래서# Store a file in the file store. This method is designed only for writing new files;
# if you need to update a given file, first delete it using #Grid#delete.
# ...
def put(data, opts={})
: