"Expecting at least a single file defining the Content Type" when trying to upload a NewGRF

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
User avatar
Donald Duck
Engineer
Engineer
Posts: 10
Joined: 24 Apr 2020 07:05

"Expecting at least a single file defining the Content Type" when trying to upload a NewGRF

Post by Donald Duck »

I just made my first NewGRF, and now I would like to upload it to https://bananas.openttd.org/manager/new-package. So I created a .tar file containing my .grf file and a license.txt file, I uploaded the .tar file under "Upload files", I filled out all the relevant fields under "Complete the description", and then I clicked "Publish", but when I clicked "Publish", I get an error saying "Expecting at least a single file defining the Content Type". How do I fix this error?
User avatar
Donald Duck
Engineer
Engineer
Posts: 10
Joined: 24 Apr 2020 07:05

Re: "Expecting at least a single file defining the Content Type" when trying to upload a NewGRF

Post by Donald Duck »

OK, I figured out what was wrong. To upload the file, I had to click on the "Add" button, not just select it using the "Choose files button".

Image
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1359
Joined: 31 May 2004 09:21

Re: "Expecting at least a single file defining the Content Type" when trying to upload a NewGRF

Post by TrueBrain »

Sorry about the confusing UI / UX ..

People keep promising us that they will make it better, but we have yet to see the Pull Requests that do :D If anyone reading this wants to make that UI better, pplllleeeeaaaasssseeee do. It is just some simple HTML with some really simple Javascript atm, so it isn't difficult to pick up where our limits of webdesign ended :P
The only thing necessary for the triumph of evil is for good men to do nothing.
Auge
Route Supervisor
Route Supervisor
Posts: 449
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: "Expecting at least a single file defining the Content Type" when trying to upload a NewGRF

Post by Auge »

Hello
Donald Duck wrote: 29 Mar 2021 10:47 OK, I figured out what was wrong. To upload the file, I had to click on the "Add" button, not just select it using the "Choose files button".
That's the way, the HTML form element for file upload works. Step 1 is to choose one (or more) file(s) for upload and step 2 is to upload it/them. Without reinventing the wheel in JS a file upload works that way on every website. And besically that's good because one can by accident have chosen the wrong file, maybe one wants to upload several files at once and not one after the other.

But, at least, there may be ways to make it more comprehensible how it worksa and what to do.

Tschö, Auge
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 15 guests