Hi
i'm on Valence 4.2
I'm Trying to do exactly the same as rkanemayer described here .. and that is determining the filename that was uploaded, and adding some timestamp to avoid duplicate names..
i'm doing exactly the same as is described in his thread.. but when a try to retrieve the localFilename with the vvgetS , i get a blank value , however when i look in the file Valence42t/vvsessvars : it is there.??
contents from the file.
content from the VVSESSVARS
in the error-app i noticed that an error was logged :
(i've tested with Exupload1
this is my code
what i've noticed that the Sessid is blanks, an di don't know why it is.. it is in the post
i'm on Valence 4.2
I'm Trying to do exactly the same as rkanemayer described here .. and that is determining the filename that was uploaded, and adding some timestamp to avoid duplicate names..
i'm doing exactly the same as is described in his thread.. but when a try to retrieve the localFilename with the vvgetS , i get a blank value , however when i look in the file Valence42t/vvsessvars : it is there.??
contents from the file.
content from the VVSESSVARS
PHP Code:
VVSESSID:5168CF9...
VVVARIABLE: VVUPLOAD_fileName
VVVALUE:barco.csv
in the error-app i noticed that an error was logged :
PHP Code:
Program VVSRVPGM
Module VVUTILITY
Procedure VVUTILITY_GETSESSVAR
Message ID VV00011
Statement Number
Message Text Session variable "VVUPLOAD_fileName" was not found
Help Text
Valence Login ID *NOSESSION
IBM i User TCO
Timestamp 2015-11-27-11.57.28.582000
Job Number 191999
Calling Program EXUPLOAD1
Call Stack VVUPLOADVVUPLOAD!-->EXUPLOAD1EXUPLOAD1!-->VVSRVPGM{VVUTILITY}VVUTILITY_GETSESSVAR!
this is my code
Code:
/copy qcpylesrc,vvHspec ** -------------------------------------------------------------- ** Copyright (C) 2008-2014 CNX Corporation ** -------------------------------------------------------------- ** Object ID: EXUPLOAD1 ** Version: V4.1 ** Description: Valence Examples ** -------------------------------------------------------------- **-------------------------------------------- ** d specs **-------------------------------------------- d successMsg s 256a d vvSessID s 64a d localFilename s 1024a varying d/define includeEMAIL /copy qcpylesrc,vvDspec **-------------------------------------------- ** program start **-------------------------------------------- /free vvSessId = vvIn_Char('sid'); vvIn.path = %char(%trim(vvUtility_getValenceSetting('ROOT_PATH'))) + 'resources/uploads'; localFilename= vvUtility_getSessVar('VVUPLOAD_fileName':vvSessId); successMsg = 'The file has been successfully uploaded to '+ %trim(vvIn.path); vvIn_file(vvIn:successMsg); vvMail.to = 'myemai....; vvMail.subject = 'log from exupload1.pgm'; vvMail.body = 'localFilename=' + %trim(localFilename); vvMail_Send(vvMail); *inlr=*on; /end-free
Code:
-----WebKitFormBoundaryQjyBlcpREtKR8kZ5
Content-Disposition: form-data; name="sid"
6BA9A22E4455CC165116A85EE0CA6420ECCAA3A5338932DC006CA73CE92F8B96
------WebKitFormBoundaryQjyBlcpREtKR8kZ5
Content-Disposition: form-data; name="app"
115
------WebKitFormBoundaryQjyBlcpREtKR8kZ5
Content-Disposition: form-data; name="pgm"
EXUPLOAD1
------WebKitFormBoundaryQjyBlcpREtKR8kZ5
Content-Disposition: form-data; name="file"; filename="052 (Medium).JPG"
Content-Type: image/jpeg
------WebKitFormBoundaryQjyBlcpREtKR8kZ5--
Comment