Not sure if this is related, but I am running into another error with changing the file ID to a different value.
if (input.Type == "pre-create")
{
response.ChangeFileInfo = new UploadHookResponseChangeFileInfoDto();
response.ChangeFileInfo.ID = input.Event.Upload.MetaData["name"];
...
The value of filename is Screenshot 2023-10-30 at 4.34.21 PM.png
This is what I see in the Azurite logs:
127.0.0.1 - - [31/Oct/2023:21:25:21 +0000] "PUT /uploads/Screenshot%202023-10-30%20at%204.34.21%E2%80%AFPM.png.info?timeout=61 HTTP/1.1" 201 -
127.0.0.1 - - [31/Oct/2023:21:25:21 +0000] "GET /uploads/Screenshot%202023-10-30%20at%204.34.21%C3%A2%C2%80%C2%AFPM.png.info?timeout=61 HTTP/1.1" 404 -
The Upload-Metdata header looks like:
Upload-Metadata: relativePath bnVsbA==,name U2NyZWVuc2hvdCAyMDIzLTEwLTMwIGF0IDQuMzQuMjHigK9QTS5wbmc=,type aW1hZ2UvcG5n,organizationId Y2I3MDkxNTAtZGQ0MC0xOTU1LThjZTItM2EwZTk5YzMyMzdi,filetype aW1hZ2UvcG5n,filename U2NyZWVuc2hvdCAyMDIzLTEwLTMwIGF0IDQuMzQuMjHigK9QTS5wbmc=
It seems like tusd accepts the custom file correct, and saves the info file correctly in Azurite … but when it tries to immediately request the info file, the value is escaped incorrectly.
The problem seems like there is a “narrow no break space” character in the file name (this file name came directly from my Mac). %E2%80%AF is what it looks like URL encoded.
If I want to set the file ID to the filename, should I only allow certain characters?