MMS phone upload MMS phone upload
 

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

MMS phone upload

Started by pcfreak, June 20, 2004, 11:31:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pcfreak

I have a mail server thats extracts the MMs attachment from a phone to a directory,

the dir name is the name of the coppermine user and just contains a single jpg file.

How can i read the dir and put the picture in coppermine database in the album of the user?

in other words?
what is the function in coppermine to get the user album , when i now the user name ?
I have a $filename , what is the function to insert the filename into coppermine db ?

i have read the file upload.php, is this posible to do this form fill automatic with my vars, then mij problem is solved


Joachim Müller

why don't you use batch-add instead? No need to re-invent the wheel imo.

GauGau

pcfreak

Quote from: GauGau on June 20, 2004, 11:58:34 PM
why don't you use batch-add instead? No need to re-invent the wheel imo.

GauGau

i wil explain it;
* people can send MMS with there mobile phone to my mail adres, but to recognice them they must set the album name and there password from coppermine in the subject of the MMS.(works great)
* my mailserver (windows nt) extracts the attachment automic and create a subfolder in coppermine with the subject name.(works great)

batch-add is a nice , buts works only manuel by the admin, if batch-add can scan automatic new files (expample: when the user views him/her photo album) and put them automic in the db then my job is complete.

the file db_input.php in the section case 'picture': can do the job for me, but the vars are received by $HTTP_POST.(thats a problem because the files are already on the server). so i have been thinking to use some functions from the file batch-add to scan the dir.i need a combination of db_input.php and batch-add.php.

Security: i have thinking about that because automic batch-add can be a high server risk, but the mailserver extract only *.jpg files. and parse only one file(mail) in 10 minutes. so the security risk is low and when i have completed the script for automatic batch-add, i can check the pass and username, so people can only post in there own user album.

i have realy done my homework and seach this forum, but coppermine is to complex for me to find out the right functions for my problem.

if i have only an example i can work it out.
So the wheel is invented but not completed.

(sorry about my bad english)


Joachim Müller

you will need a trigger that automatically starts a custom-made script based on searchnew.php. The trigger could either be your mail software or you have the windows scheduler run through the album folders and scan for new pics. I'm not sure what to recommend, you'll need some coding skills to make this work, hasn't been done before.

GauGau