howto upload two files with different allowed_types |
[eluser]Mitja[/eluser]
howto upload two files with different allowed_types. i need to upload two files, where first one must be an image (jpg, gif or png), the second file must be pdf. How to check all two uploads? If i use Code: $config['upload_path'] = './uploads/'; What to do now? $uploads = $this->upload->data() can not be used for boath files or i am wrong? Thx for help
[eluser]pistolPete[/eluser]
Have a look at the documentation: Quote:$this->upload->do_upload() So all you have to do is call your two form fields differently, e.g. image and document, then process both form fields: Code: $image_data = array();
[eluser]Colin Williams[/eluser]
You also don't need to load the library twice. Just use the initialize() function again (only after the first upload happens, of course). |
Welcome Guest, Not a member yet? Register Sign In |