You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I couldn't find any officially documented way to get uploads. After much digging, I figured out I need to (lack.request:make-request env) and then I can use (lack.request:request-parameters req). My code looks like this:
It works, but I feel like using private APIs. The parameters appear to be an alist, associating the parameter name with a list of things; to get the value of the token, for example, I need to use (cadr (assoc "token" params)). Also, for the file I get an in-memory stream and two hashes, one containing the file name and the other containing the content-type.
My question is, is this code future-proof, or is the API supposed to change? (or is there some better API that I failed to find?)
The text was updated successfully, but these errors were encountered:
I agree with the structure isn't understandable very much, however, it's taken from Hunchentoot's.
More useful helper function might be added, but the API (and its structure) won't be changed, I think.
I couldn't find any officially documented way to get uploads. After much digging, I figured out I need to
(lack.request:make-request env)
and then I can use(lack.request:request-parameters req)
. My code looks like this:It works, but I feel like using private APIs. The parameters appear to be an alist, associating the parameter name with a list of things; to get the value of the token, for example, I need to use
(cadr (assoc "token" params))
. Also, for thefile
I get an in-memory stream and two hashes, one containing the file name and the other containing the content-type.My question is, is this code future-proof, or is the API supposed to change? (or is there some better API that I failed to find?)
The text was updated successfully, but these errors were encountered: