I'm writing a Java File Upload Applet that will (eventually, and hopefully) interface with a Drupal module. The question is, how do I pass Drupal session and user information to the PHP script that talks to the applet? Where is this information stored (in Cookies)? This is important because I need to check user permissions and security with an upload.

Without having tried this yet, I'm guessing that what I need to do is pass session information from a Cookie to the applet via Javascript. Then the applet would have to pass the information via the http post. Does that sound right, or is there a better way to do this?

Comments

coreb’s picture

See how the Gallery project does it with Gallery Remote. Gallery Remote is a java client to upload to the PHP based Gallery, but they also embed it into a page as an applet.

I know it's probably a huge codebase to dive into, but it is an example that clearly works.

bigbman’s picture

It's looking like I will have to pass user and session information to the applet (as a parameter) via javascript.