Skip to content

SPIFFS - FSBrowser #1820

@q-bird

Description

@q-bird

Hi there,

I want to upload a webserver folder to Flash using FSBrowser.ino example, everything is working fine.
Then I want to use a non-standard font with the extension .woff2.
I copied a font file .woff2 to "data" folder and tried to upload using "ESP32 Sketch Data Upload" Tool...
But it showed an error:

/KFOkCnqEu92Fr1MmgVxEIzIFKw.woff2
SPIFFS_write error(-10010): unknown
error adding file!
SPIFFS Create Failed!

I was trying to add something in the code like:

String getContentType(String filename) {
  if (server.hasArg("download")) {
    return "application/octet-stream";
  } else if (filename.endsWith(".htm")) {
    return "text/html";
  } else if (filename.endsWith(".html")) {
    return "text/html";
  } else if (filename.endsWith(".woff2")) {
    return "font/woff2 woff2";
  } ...

I tried with return "font/woff2 woff2";, return "application/font-woff2";, return "font/x-woff2";...
But I still got the same error.

Is there any way to upload .woff2 font-file to Flash?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions