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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 1695 views
  • 0 likes
  • 2 in conversation