Willow-Seaside serving static files

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Willow-Seaside serving static files

eftomi
Hi, I added an image to a subclass of WAFileLibrary to serve it as a static file from within Pharo. Everything seems fine, except that the /files URL is not accessible:

Error: you are forbidden to access "/files". 

and source view displays

/files/EMStaticFiles/window.png not found 

if I click on image's URL.

I loaded Seaside as a Willow's dependency. 

Best wishes,
Tomaz




Reply | Threaded
Open this post in threaded view
|

Re: Willow-Seaside serving static files

Esteban A. Maringolo
The handler at /files (WAFileManager?), is set to explicitly forbid listing of files.

El dom., 14 de junio de 2020 07:33, Tomaž Turk <[hidden email]> escribió:
Hi, I added an image to a subclass of WAFileLibrary to serve it as a static file from within Pharo. Everything seems fine, except that the /files URL is not accessible:

Error: you are forbidden to access "/files". 

and source view displays

/files/EMStaticFiles/window.png not found 

if I click on image's URL.

I loaded Seaside as a Willow's dependency. 

Best wishes,
Tomaz




Reply | Threaded
Open this post in threaded view
|

Re: Willow-Seaside serving static files

eftomi
Thanks, Esteban. I checked the url of the image (http://localhost:8080/files/EMStaticFiles/window.png) and it is proper, however it is not accessible (I get /files/EMStaticFiles/window.png not found), so I believe that besides forbidden listings the access to files is also forbidden. I'm looking into WAFileHandler class however cannot find a way to enable serving of static files.

Best wishes,
Tomaz 



------ Original Message ------
From: "Esteban Maringolo" <[hidden email]>
To: "Tomaž Turk" <[hidden email]>; "Any question about pharo is welcome" <[hidden email]>
Sent: 14.6.2020 15:33:23
Subject: Re: [Pharo-users] Willow-Seaside serving static files

The handler at /files (WAFileManager?), is set to explicitly forbid listing of files.

Reply | Threaded
Open this post in threaded view
|

Re: Willow-Seaside serving static files

eftomi
Uh, I had to unregister and then register my Willow application again - now the file is accessible.

Best wishes,
Tomaz