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...

CGIConvMode %%EBCDIC/EBCDIC%%
DefaultFsCCSID 937
DefaultNetCCSID 1208

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"
Content-Type: application/pdf
Content-Transfer-Encoding: base64

JVBERi0xLjYN...

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 table...

255044462D312E31
%PDF-1.6
(CCSID 819)

Now, I get...

4A56424552693078

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 2550444...??

Thanks for any help.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.