lovasoa / SQLpage

SQL-only webapp builder, empowering data analysts to build websites and applications quickly
https://sql.ophir.dev
MIT License
880 stars 62 forks source link

SQLPage fails to read files from sqlpage_files inserted by a migrations until restart #461

Closed pchemguy closed 6 days ago

pchemguy commented 1 week ago

Introduction

When files to be served from the sqlpage_files table and inserted into the database via a migration, they cannot be accessed until the server is restarted (using SQLPage binary on Windows, probably the serverless mode?). Correct behavior only occurs after restart.

To Reproduce

Insert a dummy file into sqlpages_files via a migration and attempt to access it without restarting the server.

-- your sql here

Actual behavior

SQLPage returned 404 when attempted to open files in question. No attempts to refresh the contents helped.

 ERROR sqlpage::webserver::http] Unable to read file "themes/fancy/CN.svg": 404 Not Found

Screenshots

Clipboard-1

Expected behavior

The files should be accessible without restart. When in-memory database is used, restart is not possible at all.

Version information