Error on uploading mp3 - No route found for path: "upload" and request method: "GET"

Hi! I’m trying to upload an mp3 via a file field in panel, but I keep getting the error message:

No route found for path: “upload” and request method: “GET”

I don’t have this problem when uploading on local server. Any ideas what the problem might be?

Here’s the yaml for the field in question:

    type: files
    multiple: false
    uploads: true

Hm, sounds as if POST requests are disabled, because the upload path is only available for POST requests, not for GET requests.

how can I test / fix this?

It’s weird because it doesn’t happen when I upload a cover image to the same page, or photos to a different page - which I assume would need to use the POST requests?

Yes, and it would be very strange if POST requests were disabled, anyway.

Try removing the uploads: true line, it doesn’t make sense, because uploads are enabled by default and I think if not false, this option expects a file template name.

I remove the uploads true line but getting the same problem. I just tested it with a couple of different .mp3 files and they upload fine, so maybe it’s a problem with this particular mp3 file! Weird! It plays fine, but maybe there’s something gone bad with the file? I’m gonna try re-exporting it later and I’ll let you know what happens.

That might be the case…

The problem was that the filename had an apostrophe in it - it was called don’t-flush-my-head.mp3. I renamed it to dont-flush-my-head.mp3 and it uploaded fine.

I thought kirby had an auto file renaming system though? Is something broken that I need to tend to?

Thank you for your help, by the way! :relaxed:

Hm, I tried uploading a file with an apostrophe without issues. What is your Kirby version? Might be something server side after all…

I’m on 3.3.0. I recently dabbled with the .htaccess file to forward the http:// and no-www to https://www so I’m not sure if that’s messed something up? I tried reverting to the original .htaccess file and the problem persisted so I’m not entirely sure that’s it.

We are currently at 3.3.6, so updating sounds like a good idea…

oh cool, thanks for the heads up. I’ll do so!

Hm, I updated but the same problem remains when I upload the file with the apostrophe.



I had the same kinda error as you’re mentioning.
I had set my .htaccess file to force trailing slash.

With this setting on I didn’t have any problems on first sight but when I tried to upload a simple pdf file I had this exact error.

Not sure if you do have this setting but as you’re mentioning that you “dabbled with the .htaccess file” I assume that could be your problem too.

Please note that browser can be very annoying when it comes to .htaccess/301 redirects and cache the hell out of that.

I would recommend you to try this in another browser / private window.

Hope this helps!

Just for reference if anyone gets same error if you don’t have file upload with same key somewhere in blueprint. For example this GitHub - diesdasdigital/kirby-meta-knight: 🔍 Meta Knight – SEO & Social Media Sharing Plugin for Kirby. seo plugin generates many meta_KEY fields. So you might have conflict there.