Skip to content

Commit

Permalink
Merge pull request #1166 from SeasideSt/Fix-1117
Browse files Browse the repository at this point in the history
Fix 1117
  • Loading branch information
jbrichau authored Dec 3, 2019
2 parents 74b59ab + c01b6e3 commit 303f227
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 34 deletions.
5 changes: 3 additions & 2 deletions repository/Seaside-FileSystem.package/.filetree
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"noMethodMetaData" : true,
"separateMethodMetaAndSource" : false,
"useCypressPropertiesFile" : true }
"noMethodMetaData" : true,
"useCypressPropertiesFile" : true
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
{
"name" : "GRPackage" }
"name" : "GRPackage"
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
{
"name" : "GRPlatform" }
"name" : "GRPlatform"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
I can be used to serve files directly from disk rather than having to load them into methods using a WAFileLibrary.

It has two options:
- list file directories or not (defaults to false).
- the directory to serve (defaults to the image directory).

Usage:
|app|
app := WAAdmin register: WAExternalFileLibrary at: 'myfilesondisk'.
app
preferenceAt: #listing put: true;
preferenceAt: #directory put: '/'
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
accessing
description
^ 'File Directory'
^ 'External File Directory'
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ handling
processContext: aRequestContext
| filename |
filename := self filenameForConsumer: aRequestContext consumer.
(self listing and: [ GRPlatform current isDirectory: filename ])
ifTrue: [ self
processDirectory: filename
context: aRequestContext ]
(GRPlatform current isDirectory: filename)
ifTrue:[
self listing
ifTrue:[ self
processDirectory: filename
context: aRequestContext ]
ifFalse:[ self respondForbiddenListingFor: aRequestContext ] ]
ifFalse: [ self processFile: filename context: aRequestContext ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
handling
respondForbiddenListingFor: aRequestContext
aRequestContext respond: [ :response |
response
forbidden;
nextPutAll: 'Listing not allowed' ]
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"commentStamp" : "JohanBrichau 8/27/2019 17:02",
"super" : "WARequestHandler",
"category" : "Seaside-FileSystem",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "WAExternalFileLibrary",
"pools" : [
],
"super" : "WARequestHandler",
"type" : "normal" }
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"category" : "Seaside-FileSystem",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "WAExternalFileLibraryConfiguration",
"pools" : [
],
"super" : "WASystemConfiguration",
"type" : "normal" }
"category" : "Seaside-FileSystem",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "WAExternalFileLibraryConfiguration",
"type" : "normal"
}

This file was deleted.

3 changes: 1 addition & 2 deletions repository/Seaside-FileSystem.package/properties.json
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{
}
{ }

0 comments on commit 303f227

Please sign in to comment.