You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, when trying to update to v5 we encountered a bug where all absolute paths would return a NotFound instead of the proper path of the file. This is the same bug as #2117 that was fixed with #2123 but looking at the code, this fix doesn't exist anymore.
I'll update the website and the relevant field/function documentation to clarify that leading / slashes should not be used. In v5 this aligns better how modern Go fs.FS implementations behave, and Echo v4 was using/mirroring os.Open, which is now little bit disfavored when it comes to serving files.
Activity
aldas commentedon Mar 21, 2026
in
v5e.Filesystemis confined to current working directoryIf you want to have similar behaviour like
v4did you need to dozoriya commentedon Mar 21, 2026
That still doesn't work for absolute paths.
c.File("/dir/my-file.txt")will return aNotFoundbutc.File("dir/my-file.txt")will work.aldas commentedon Mar 29, 2026
I'll update the website and the relevant field/function documentation to clarify that leading
/slashes should not be used. Inv5this aligns better how modern Gofs.FSimplementations behave, and Echov4was using/mirroringos.Open, which is now little bit disfavored when it comes to serving files.