Login and Upload via Desktop Application using Visual Basic Login and Upload via Desktop Application using Visual Basic
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Login and Upload via Desktop Application using Visual Basic

Started by kalyanalee, March 28, 2016, 05:13:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kalyanalee

Dear Admin and Anyone,

I want to create a desktop application. Within this application, we could type username and password to login. Then, we could upload files to a specific album.

Please help me to do this.

Thank you very much.

kalyanalee

Dear Admin and Anyone,

Could you help me to understand the process of login and posting in Coppermine?

Thank you.

Regards.

Αndré

When you login to Coppermine, it will create a session cookie for authentication. It has no fixed name, but is generated from the user's browser agent:
$this->client_id = md5($superCage->server->getRaw('HTTP_USER_AGENT').$CONFIG['site_url']);

For more information, please have a look at bridge/coppermine.inc.php, especially at the *session* functions.


Regarding uploading I haven't checked the code yet how this is possible yet. I think ron4mac currently has a more extensive comprehension at the upload process and knows where/how you have to send your files to (probably upload.php). Maybe he replies to this thread.

Αndré

I just had a closer look at the simple upload form. It sends its data to db_input.php:
method html_single
album 6
userpicture <binary data here>
title my title
caption my description
keywords my_keyword
event picture
form_token ea90851a5f7ec9185adf179286ed12f3
timestamp 1459953277

ron4mac

As all submitted input to CPG is protected by use of a form_token, any desktop application would have to mimic the act of logging in by receiving the login form (and its token/timestamp), then send the credentials along with the token/timestamp. After succeeding in doing that, the same method would need to be done to get the upload form and send the appropriate things back to CPG along with the new token/timestamp.

It is also likely that you would have to maintain 'cookie' information in the data transfers to accomplish this.