× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



No roll-your-own and other utilities here. CGIDEV2's standard ZhbGetInput() can handle file uploads that are part of a "multipart/form-data" request. ZhbGetInput() is the procedure used to read in CGI input parameters.




-----Original Message-----
From: Jon Paris [mailto:jon.paris@xxxxxxxxxxxxxx]
Sent: Sunday, June 17, 2018 11:07 AM
To: Web400@Midrange. Web400 <web400@xxxxxxxxxxxx>
Subject: Re: [WEB400] CGIDEV2 upload problem

Are you using the Easy400 file upload utility or have you rolled your own? If your own I would consider switching to Giovanni's code.

That said, we gave up doing our file uploads with RPG in favour of using PHP. Very simple, very reliable and significantly faster tag RPG in our experience. Happy to share our script with you if you email me off list. Our PHP hooks t the same Apache instance as everything else and so authentication is not an issue.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Jun 17, 2018, at 5:02 PM, Justin Taylor <JUSTIN@xxxxxxxxxxxxx> wrote:

I have a web service implemented using CGIDEV2. It uses basic authentication in Apache via a validation list. The web service receives two file uploads, as parameters, per call. It passes the IFS paths to those files to a *SRVPGM and returns the response to the caller.

This works fine most of the time. About once a day, CGIDEV2 crashes processing the file uploads. This permanently corrupts the IBMi job, and all subsequent calls to that job fail (even different programs/ activation groups). If the client retries, the call works (provided it gets a different IBMi job).

I'm working on a solution. Unlike text parameters, file uploads in CGI aren't trivial for DIY. I'm leaning towards replacing the RPG service with something else (e.g. Node, PHP, Python), although I'm reluctant to add a new language to our environment. I don't see a clear choice for which language to try. Also, the basic authentication is a big question mark.

We can probably change the URL the client calls, but that's probably about it. The budget is my time.

I welcome and appreciate any input you have to offer.

TIA
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing list To post a message email: WEB400@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/web400.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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.