sqlpage / SQLPage

Fast SQL-only data application builder. Automatically build a UI on top of SQL queries.
https://sql.datapage.app
MIT License
1.57k stars 89 forks source link

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

Closed pchemguy closed 3 months ago

pchemguy commented 3 months 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