Skip to content
Advertisement

Create custom function for upload and insert data

Is there any chance that I can create a custom function for upload? I have 2 function which are insert_content() and insert_officials. In that function there is a code for uploading image. How will I do that since they have the same code of config.

JavaScript

Advertisement

Answer

Just make a function and put it in a model or something:

JavaScript

Usage:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement