Uploading a data set

I found the issue!

I was using

HfFileSystem('my_token_here')

instead of

HfFileSystem(token='my_token_here')

The lack of argument token made me unauthorised to access my repo, which gave me this 401 and weird url ‘preupload/main’.

So: explicitely pass the token argument, or check that you are logged in.
This url seems to be used in the background to pre-stage commits.