Upload file image for Pier 3.0 into Gemstone 3.1.0.1 environment
by dtrussardi@tiscali.it
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
11 years, 2 months
Manage Pier in Gemstone environment
by dtrussardi@tiscali.it
Ciao,
i do some test for use Pier 3.0 into Gemstone 3.1.0.1 environment.
I load the 3.0.3 [ConfigurationOfPier3AddOns] and all seems loaded properly.
I can work with the Pier Admin Setup for create new pier instance:
i configured two pier environment based
one to Book Template
and one to Blank Template.
The *instance work fine.
If i work with *instance-admin when i do the login the system answer:
a Breakpoint occurred (error 6005), Method breakpoint encountered. - G/S[MonvisoGruppi:1
Seaside Walkback
MessageNotUnderstood
Remote Debug Proceed Full Stack
Possible Causes
you sent a message this type of object doesn't understand
Stack Trace
thisContext
WAGemStoneWalkback >> currentContextForWalkback (envId 0) @2 line 3
self
aWARemoteDebuggingWalkback
initial
nil
context
nil
.t1
GsContext
.t2
1
thisContext
WAGemStoneWalkback >> initializeWithException: (envId 0) @3 line 4
self
aWARemoteDebuggingWalkback
anException
a MessageNotUnderstood occurred (error 2010), a ExecBlock does not understand #'receiver'
context
nil
.t1
aWARemoteDebuggingWalkback
thisContext
WARemoteDebuggingWalkback >> initializeWithException:continuation: (envId 0) @2 line 3
self
aWARemoteDebuggingWalkback
anException
a MessageNotUnderstood occurred (error 2010), a ExecBlock does not understand #'receiver'
aContinuation
GsProcess(oop=249109249, status=debug, priority=4, WARemoteDebuggingWalkbackErrorHandler >> open: (
thisContext
WARemoteDebuggingWalkback class >> exception:continuation: (envId 0) @3 line 2
self
WARemoteDebuggingWalkback
anException
a MessageNotUnderstood occurred (error 2010), a ExecBlock does not understand #'receiver'
aContinuation
GsProcess(oop=249109249, status=debug, priority=4, WARemoteDebuggingWalkbackErrorHandler >> open: (
thisContext
[] in WARemoteDebuggingWalkbackErrorHandler >> open: (envId 0) @18 line 27
self
anExecBlock
wb
nil
logEntry
nil
continuation
GsProcess(oop=249109249, status=debug, priority=4, WARemoteDebuggingWalkbackErrorHandler >> open: (
anException
a MessageNotUnderstood occurred (error 2010), a ExecBlock does not understand #'receiver'
self
aWARemoteDebuggingWalkbackErrorHandler
.t1
WARemoteDebuggingWalkback
.t2
a MessageNotUnderstood occurred (error 2010), a ExecBlock does not understand #'receiver'
.t3
GsProcess(oop=249109249, status=debug, priority=4, WARemoteDebuggingWalkbackErrorHandler >> open: (
The relative GemTools Debug record report :
WAErrorHandler >> remoteBreakpointMethod (envId 0)
WARemoteDebuggingWalkbackErrorHandler >> open: (envId 0)
WADebugErrorHandler >> debugAndResume: (envId 0)
WADebugErrorHandler >> handleDefault: (envId 0)
WAErrorHandler >> handleError: (envId 0)
WAErrorHandler >> handleGemStoneException: (envId 0)
WAGemStoneWalkbackErrorHandler >> handleException: (envId 0)
[] in WAExceptionHandler >> handleExceptionsDuring: (envId 0)
ExecBlock >> on:do: (envId 0)
[] in WAExceptionHandler >> handleExceptionsDuring: (envId 0)
[] in ExecBlock >> on:do: (envId 0)
AbstractException >> _executeHandler: (envId 0)
AbstractException >> _signalWith: (envId 0)
AbstractException >> signal (envId 0)
Object >> doesNotUnderstand: (envId 0)
Object >> _doesNotUnderstand:args:envId:reason: (envId 0)
Announcer >> subscribe:do: (envId 0)
Announcer >> on:do: (envId 0)
PRAdminNavigator >> announcementRegister (envId 0)
PRAdminAnnouncingComponent >> initialize (envId 0)
GRObject class >> new (envId 0)
PRAdminUIChild class >> contextGetCallback:contextSetCallback: (envId 0)
PRAdminUI >> navigatorComponent (envId 0)
PRAdminUI >> children (envId 0)
WAPresenter >> childrenDo: (envId 0)
WAVisiblePresenterGuide >> visitPresenter: (envId 0)
WAPainterVisitor >> visitComponent: (envId 0)
WAComponent >> accept: (envId 0)
WAVisiblePresenterGuide >> visitDecoration: (envId 0)
WADecoration >> accept: (envId 0)
WAPainterVisitor >> visitDecorationsOfComponent: (envId 0)
WAComponent >> acceptDecorated: (envId 0)
WAPresenterGuide >> visit: (envId 0)
[] in WAVisiblePresenterGuide >> visitPresenter: (envId 0)
[] in WAPresenter >> childrenDo: (envId 0)
Collection >> do: (envId 0)
WAPresenter >> childrenDo: (envId 0)
WAVisiblePresenterGuide >> visitPresenter: (envId 0)
WAPainterVisitor >> visitDecoration: (envId 0)
WAVisiblePresenterGuide >> visitDecoration: (envId 0)
WAPainterVisitor >> visitDelegation: (envId 0)
WADelegation >> accept: (envId 0)
WAPainterVisitor >> visitDecorationsOfComponent: (envId 0)
WAComponent >> acceptDecorated: (envId 0)
WAPresenterGuide >> visit: (envId 0)
WAVisitor >> start: (envId 0)
Thanks for any suggestion,
Dario
11 years, 2 months