resource.file cannot access file A when another file B's name starts with file A's name

How to reproduce

  1. Create resource in some project.
  2. Upload file a
  3. Upload file a1
  4. In python, run
import coscine

token = "My Coscine API token"
client = coscine.ApiClient(token)
project = client.project("My Project")
resource = project.resource("My Resource")
myfile = resource.file('a')

Expected result

A FileObject corresponding to the uploaded file a.

Actually obtained result

An TooManyResults exception is thrown. The Coscine API responds with all files which start with a, which are two files in this case.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information