parameters: (m, data, collection=settings.COL_SAMPLES)
return_statement: return m
docstring: Add a file to storage.
  
      :param m: The filename.
      :type m: str
      :param data: The data to add.
      :type data: str
      :param collection: The collection to grab the file from.
      :type collection: str
      :returns: str
docstring_summary: Add a file to storage.
docstring_tokens: Add a file to storage .
function: def put_file_gridfs(m, data, collection=settings.COL_SAMPLES):
      """
      Add a file to storage.
  
      :param m: The filename.
      :type m: str
      :param data: The data to add.
      :type data: str
      :param collection: The collection to grab the file from.
      :type collection: str
      :returns: str
      """
  
      mimetype = magic.from_buffer(data, mime=True)
      try:
          fs = gridfs_connector("%s" % collection)
          fs.put(data, content_type="%s" % mimetype, filename="%s" % m)
      except Exception as e:
          logger.error(e)
          return None
      return m
function_tokens: def put_file_gridfs ( m , data , collection = settings . COL_SAMPLES ) : mimetype = magic . from_buffer ( data , mime = True ) try : fs = gridfs_connector ( "%s" % collection ) fs . put ( data , content_type = "%s" % mimetype , filename = "%s" % m ) except Exception as e : logger . error ( e ) return None return m