mails2nitesh / kfm

Automatically exported from code.google.com/p/kfm
0 stars 0 forks source link

Suggestion: Database api #73

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I suggest to add database api to allow developer to store any related data for 
the uploaded file in his own database. This will help community applications or 
multi-users application to establish informatic method to hold and manage users 
submissions and integrate it with the application.

The basic idea of this feature will depend on driving the kfm data inputs to 
another table(s) and another fields.

Original issue reported on code.google.com by said.fox on 22 Jun 2010 at 9:01

GoogleCodeExporter commented 8 years ago
interesting. any ideas how you would like this to work?

I'm afraid I have very very little time at the moment to work on KFM, but 
should have time in the near future (about a month) to devote to some work.

Original comment by kae.verens@gmail.com on 23 Jun 2010 at 8:46

GoogleCodeExporter commented 8 years ago
Well, The structure of KFM database's tables will be kept as it is and any CRUD 
operation related to it will be kept too. However, in the case of activation 
database api feature, another customized CRUD operations by the developer 
should be applied, successive to those of basic KFM operations.

For example, files data is stored in kfm_files. Suppose the developer has 
designed another table called availablefiles to handle files uploaded by users, 
which has the following structure:

id,user_id, file_name, file_size 

So after inserting data into kfm_files, the databse api -upon some 
configurations - will take the value of file_name and collect other values from 
other sources, user_id from session for example and then insert them into 
availablefiles table.

The configuration will determine, or should answer the following questions for 
api feature:
1- What is the database should be used?
2- What is the table(s)? -availablefiles-
3- What's the value source of each field in the table? For example id->null(the 
databse will increment it automatically), user_id->SESSION['user_id'], 
file_name->kfm_files.file_name, file_size->callBackFunctionOutput() or 
file_size->functionName()

Original comment by said.fox on 23 Jun 2010 at 11:56