BookmarkSubscribeRSS Feed
BenB
Calcite | Level 5

I've been working on a custom input for that feeds my stored process and recently I added the ability to upload a file.  As a result, my previous approach that used the _username and _password parameters seems to be broken.  http://support.sas.com/documentation/cdl/en/stpug/61271/HTML/default/viewer.htm#a003259930.htm

Here's a brief history of what I have done and where I am stuck.

(I can post more code, but hopefully someone can see what I am missing with these snippets)

Version 1 - custom input form that sends parameters through the URL

<FORM name="form" id="form" METHOD="GET" ACTION="&_URL">

<INPUT TYPE="HIDDEN" id="usernm" NAME="_username" VALUE="">

<INPUT TYPE="HIDDEN" id="pass" NAME="_password" VALUE="">

This works, but since some of my text boxes are large, I'd prefer not to use GET.

Version 2 - custom input form that sends parameters via POST

<FORM name="form" id="form" METHOD="POST" ACTION="&_URL">

<INPUT TYPE="HIDDEN" id="usernm" NAME="_username" VALUE="">

<INPUT TYPE="HIDDEN" id="pass" NAME="_password" VALUE="">

This works, but recently I was asked to add the ability to upload files.  As a result, I needed to change the form enctype value.

http://support.sas.com/documentation/cdl/en/stpug/61271/HTML/default/viewer.htm#a003254547.htm

Version 3 - custom input form that sends parameters and files via POST

<FORM name="form" id="form" METHOD="POST" ACTION="&_URL" enctype="multipart/form-data">

<INPUT TYPE="HIDDEN" id="usernm" NAME="_username" VALUE="">

<INPUT TYPE="HIDDEN" id="pass" NAME="_password" VALUE="">

<INPUT type="file" id="myfile" NAME="myfile">

After executing this, the form submit takes me to the SAS Logon Manager, which I am trying to avoid by using _username and _password.  My password is encoded (I have

AllowEncodedPassword is set to true).

Does anyone know what's going on with POST when the enctype is "multipart/form-data?

Thanks.

2 REPLIES 2
Vince_SAS
Rhodochrosite | Level 12

Have you tried using Basic Aunthication (/do1) with Version 3?

Vince DelGobbo

SAS R&D

BenB
Calcite | Level 5

Yes, that did not fix the issue.  I have a ticket open with SAS.  I was able to code a work around by splitting it into two stored processes, but that's an necessary step, so I'm hopeful that SAS can resolve my ticket.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1889 views
  • 0 likes
  • 2 in conversation