Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

HTML5 Game: 403 error when accessing files in folders

A topic by hby created Aug 07, 2018 Views: 2,355 Replies: 8
Viewing posts 1 to 4
(1 edit)

I uploaded a zip file containing all of my game files. The data assets are in a 'data/' folder. The page had no problem loading the files in the root directory of the zip but everything in the 'data/' folder couldn't be downloaded. I double checked that the case sensitivity is correct and that I'm using relative path. Is there something that I'm missing?

Edit: Spelling

Admin (1 edit) (+1)

If this is for an HTML5 game, then you are probably running into one of two common problems:

  • File names are case sensitive on our servers. You must reference your game's assets using the same capitalization
  • Only use relative paths to reference resources in your zip. Since itch.io loads your game from a directory on our server, if you use an absolute path your game will look in the wrong place

We have information about the ZIP file requirements on our documentation: https://itch.io/docs/creators/html5#zip-file-requirements

Hope that helps. Tell me if you still aren't able to get it working.

(1 edit)

Hi leafo,

I double checked the case sensitivity and relative path, and it still didn't work. Could there be a bug somewhere dealing with (multiple levels of) folders?

Edit: Grammar

I tried uploading the same .zip file with butler and it worked fine this time. Possible bug on the browser upload functionality?

Admin

Unlikely it's a bug, since butler and web zip uploads are processed the same way. It's more likely butler zipped the file with a different directory structure than how you did it manually, which may have been enough for the file paths to match correctly. Did you check the browser console when it was failing? If you see a 403 error then you can look at the path of the file on that error to see how you're referencing the file incorrectly. Thanks

Strange. Butler didn't package the file for me. I was uploading the same zip file created by my own script.

I have same error, my files works well on my own server, but here it doesn't( 

Here is my URL
https://chpockrock.itch.io/9-daemons?secret=Aw2GsEiaVxsppHDckkB0MCTIc

(1 edit)

@chpockrock

Your link works, to me.

@utstudio thanks! I already fixed it, the problem was in relative paths

This topic has been auto-archived and can no longer be posted in because there haven't been any posts in a while.