Copyright ©

Mongoose OS Forum


Max file size on esp32 http

Hello, I'm working with an esp32, and I'm trying to get the http server in mongoose os to serve up a larger file (58k) via the 'files/' directory. Other smaller files are served ok but the bigger file just returns 0 bytes to the client. Is there something I'm missing here?


  • rojerrojer Dublin, Ireland

    are you sure the file is actually on the fs? are you able to download it with mos get?

  • FractalstabilityFractalstability Logan, UT, USA

    Thanks for the help.

    I tried two esp32 WROOM-32s with the same results. The broken file is actually 60145b and the next largest file is 56473b which works fine. Total in fs/ is 151676b right now. Everything from fs/ seems to be there--the file shows up when I do mos ls, yet mos get also returns 0 bytes. I tried to mos put the file there and Error: (500) failed to write data is returned.

  • rojerrojer Dublin, Ireland
    edited January 23

    this definitely looks like a full filesystem to me.
    unless you changed the default size, it is 128K (closer to 110K usable with overhead).
    this happened to me too - build would not even fail if fs could not be built. however, i thought i fixed it - can you double-check that you have latest mongoose-os sources? it should fail to build if FS is too small for all the files from fs/ to fit.

    anyway. you should change the FS_SIZE variable and, for now, also edit the partition table to adjust the sizes of fs_0 and fs_1 parititons.

    it's a bit complicated, i know. i plan to make it easier to adjust - by just setting FS_SIZE.

  • FractalstabilityFractalstability Logan, UT, USA

    Thanks! After some experimentation I managed to make everything fit. Cheers.

Sign In or Register to comment.