File::create stopped working after moving to K5

I’m trying to debug something before opening up a GitHub issue because I’m not entirely sure if this is a bug or me doing something wrong.

I’m currently using JS to pass a blob of data recorded from the microphone to a custom route and then generate an audio file to store on the backend.

On the route side I have a bunch of checks to make sure I got the proper data and the I do a simple File::create

File::create([
    'parent'   => page('page://voicenote'),
    'source'   => $upload['tmp_name'],
    'filename' => $filename,
    'template' => 'default',
    'content'  => []
]);

On Kirby 4.8 everything—well, there’s a firefox specific bug but that’s a separate issue—is working. The data is passed correctly to the route, the file is created.

If I switch to K5—and I tried RC3, 4, and 5—I get this same error, in all browsers:

‘There was an error: The extensions for “684bd06aca07f_voicememo.webm” is missing’

Based on the browser it changes the extension on the error (ogg in firefox, mp4 in safari, webm in chrome) but the behavior is the same.

This is a screen with the console output using K5 at the top, K4 at the bottom.

Am I missing something here?

Anyone on the team has any idea about this? Should I move this over to GitHub and open an issue there?

Yes please. No direct idea.

1 Like

Done. There’s also a test case attached.