About a month ago, I installed the latest version of CGIDEV2, and
developed functionality that allows users to upload file attachments to DB2
table via the web, with the ability to download from the DB2 table. In this
way, files can be attached to 'orders' and users can view these files when
they wish. All was working well (even made a video demonstrating the
process to users).
Now paperwork has been approved for me to promote this development to a QA
environment. I tested the functionality again and hit an issue that I've
been unable to resolve. I'm unaware of any changes that have been made in
the past month.
Now, when the file attachment data reaches CGISRVPGM2, it appears to have
been converted and I don't know why.
I have specified...
If, for example, I attempt to upload a PDF document, I can see in browser
debug, that the post contains...
Content-Disposition: form-data; name="Filedata"; filename="Imp 4991.pdf"
The above base64 data translates to "%PDF-1.6", which is what I see when I
open the PDF document in Notepad. I'm unsure whether it should be base64
encoded, but I believe this was working this way previously.
When I did this a month ago, I got the correct hex values in the DB2
Now, I get...
Debugging, I see this is the data (in hex) that is read and written to the
temporary filename in CGISRVPGM2. CGISRVPGM2 doesn't appear to be
converting this data.
I don't know why I'm now getting 4A564...whereas previously I got
Thanks for any help.
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.