Hmm, I'm happy to look at this - what do you think the approach should be:
* Create separate Gemstone and Pharo packages isolating file handling differences in each
* Use a cross platform file API, if so which one?
* something else I haven't thought of?

Thoughts?

Nick

On 1 October 2012 23:21, Dale Henrichs <dhenrich@vmware.com> wrote:
Regarding the FileDirectory-related changes it looks like some FileSystem code is sneaking into the Pier-FileUpload-Common-Wysiwyg .. I wouldn't think that FileSsystem code would be considered "Common" ... if it _is_ considered common, then I guess we will have to make a gemstone specific branch of the package ...

Nick, what do you think?


Dario, I'm looking into your final issue now ...

Dale

----- Original Message -----
| From: dtrussardi@tiscali.it
| To: "magritte-wiki" <smallwiki@iam.unibe.ch>
| Sent: Wednesday, September 26, 2012 8:17:22 AM
| Subject: Upload file image  for Pier 3.0 into Gemstone 3.1.0.1 environment
|
|
| Ciao,
|
|
| i test the Pier 3.0 into a Gemstone 3.1.0.1 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 ******
|
|
|
| createUploadedFilepath: filename | 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">
|
|
| don't work.
|
|
| 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:
|
|
| PRFileView
|
|
|
| respondUsing: aResponse
| | file |
| file := self context structure file.
|
| aResponse
| binary;
| cacheForever;
| contentType: file mimetype seasideMimeType;
| headerAt: 'Content-Disposition' put: 'inline; filename="' , file
| filename , '"';
| nextPutAll: file contents;
| respond
|
|
| Any consideration is welcome.
|
| Thank,
|
|
| Dario
|
|
|
|
|
|
| _______________________________________________
| Magritte, Pier and Related Tools ...
| https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki