i test the Pier 3.0 into a Gemstone 188.8.131.52 environment.
I load the 3.0.3 [ConfigurationOfPier3AddOns] and all seems loaded properly.
I configured the default pier instance adding the NAFileUploadConfiguration
and setup the relative
Uploaded files path root
to the directory on the server for save the image.
After login in the pier instance in the traditional mode ( not with pier-admin )
i can update one pier page.
When i work with the image support the system don't work fine.
I need to change the:
PRFileUploadWysiwygEditorBase createUploadedFilepath: method with the code between ******
| pathroot currentStructure structurePath destinationDirectory pathRootNoTrailingSlash |
pathroot := self application fileuploadPathRoot.
currentStructure := self context structure.
structurePath := currentStructure absolutePath copyReplaceAll: '/' with: GRPlatform current pathSeparator .
pathRootNoTrailingSlash := (FileDirectory on: pathroot) pathName.
destinationDirectory := FileDirectory on: (pathRootNoTrailingSlash, structurePath).
NAExternalFile ensureDirectoryExists: destinationDirectory pathName.
"^ (destinationDirectory / filename) pathName"
^( FileDirectory on: (destinationDirectory fullNameFor: filename)) pathName
With this change the image is save in the specific directory on the server.
Anyone ( if this change are considered right ) can update the relative package ?
I have some problem relative to the web request for the image.
For now the request
<img alt="Pizzaflash.jpg" src="/pier/about/pizzaflash.jpg">
My thoughts, my goal is that the image is manage directly by the Lighttpd or Apache web server
not read by Gemstone environment and response with:
| file |
file := self context structure file.
contentType: file mimetype seasideMimeType;
headerAt: 'Content-Disposition' put: 'inline; filename="' , file filename , '"';
nextPutAll: file contents;
Any consideration is welcome.