synopse / mORMot2

OpenSource RESTful ORM/SOA/MVC Framework for Delphi and FreePascal
https://synopse.info
Other
516 stars 130 forks source link

const STATIC_URI= '.static' is invalid in Windows XP #208

Closed daselang closed 1 year ago

daselang commented 1 year ago

For Windows XP, in mORMot2, in file mormot.rest.mvc.pas, STATIC_URI = '.static'; we can't create a dir named .static,error tip shows 'must input file name'. so we can't publish static files such as js,css...

same issue in mORMot1, in file mORMotMVC.pas STATIC_URI = '.static';

But in Windows 10,we can name a dir with '.static'

Can you fix this const STATIC_URI with a new name,delete the '.'? rename it as STATIC_URI = 'static'?

Maybe it is a breakchange.

synopse commented 1 year ago

You can create a folder named .static on Windows XP. I just was able to do it. So I don't understand your problem.

daselang commented 1 year ago
image

Windows XP SP3 ,Simple Chines version

daselang commented 1 year ago

Hi, @synopse 必须键入文件名,means 'must input file name'

synopse commented 1 year ago

This is an XP file explorer bug. There is no problem using mkdir on the command line or a pascal program, or a tool like TotalCommander.

daselang commented 1 year ago

maybe I could use TMvcViewsAbstract.ViewStaticFolder := MakePath([params.Folder, 'static'], True); to change the default static folder which is as same name as STATIC_URI= '.static' to store the js,css files, and still keep the url path /**/.static/** mapping to new static file paths.

synopse commented 1 year ago

The easiest is just to create the folder. ;)