Is there a way to see what the filename is of the file being uploaded using vvin_file()? I want to take the filename and append a timestamp to it (ie. myfile.txt to myfile-20150408-140522.txt). I just created a custom copy of EXUPLOAD1 to see if I could vvin_char('filename') and it retrieved nothing. So I pulled up the the console in my web browser (Chrome) and went to the network tab. I re-uploaded the file and I noticed this in the request payload:
How do I gain access (in RPG) to the hidden web variables specified in the form for this view? My main objective is to simply modify the existing filename so I can append a unique identifier to it (in case they upload another one).
---edit---
Just did a little digging/debugging and found that globalInDS.fileName within vvin_file contains the filename. Is there a way for the RPG program called by vvupload.pgm to gain access to this variable? I tried adding globalInDS.fileName to my RPG program and it came back as undefined (I assume it's encapsulated within vvin)
Code:
------WebKitFormBoundaryW5niHvEeuM0bOVjr Content-Disposition: form-data; name="sid" 2581E634D09C6CA7BC940269C25CB4B73A6287CE6D6CC4A8FDE14BD8019C64A6 ------WebKitFormBoundaryW5niHvEeuM0bOVjr Content-Disposition: form-data; name="app" 115 ------WebKitFormBoundaryW5niHvEeuM0bOVjr Content-Disposition: form-data; name="pgm" EXUPLOAD1 ------WebKitFormBoundaryW5niHvEeuM0bOVjr Content-Disposition: form-data; name="file"; filename="myfile.txt" Content-Type: image/jpeg ------WebKitFormBoundaryW5niHvEeuM0bOVjr--
---edit---
Just did a little digging/debugging and found that globalInDS.fileName within vvin_file contains the filename. Is there a way for the RPG program called by vvupload.pgm to gain access to this variable? I tried adding globalInDS.fileName to my RPG program and it came back as undefined (I assume it's encapsulated within vvin)
Comment