Welcome Guest, Not a member yet? Register   Sign In
upload config path question
#4

[eluser]LuckyFella73[/eluser]
Hi,

I have never done that before but I think you have to
use the upload class to upload the file to the server
and then do a query to store the file into your database.
The file upoload class is just to upload a file to your
server. So you will have to do that in two steps.

Try to upload the file, read the file to a variable.
For the right path use the informations provided by
Code:
$this->upload->data()

// in case you don't know, following data is available:
Array
(
    [file_name]    => mypic.jpg
    [file_type]    => image/jpeg
    [file_path]    => /path/to/your/upload/
    [full_path]    => /path/to/your/upload/jpg.jpg
    [raw_name]     => mypic
    [orig_name]    => mypic.jpg
    [file_ext]     => .jpg
    [file_size]    => 22.2
    [is_image]     => 1
    [image_width]  => 800
    [image_height] => 600
    [image_type]   => jpeg
    [image_size_str] => width="800" height="200"
)
// taken from the CI userguide

After that store the file in your db by using the variable
you read the file into before.
That should work.



Sorry for not beeing more detailed but as mentioned before
I have never done that before.


Messages In This Thread
upload config path question - by El Forum - 10-30-2009, 08:42 AM
upload config path question - by El Forum - 10-30-2009, 09:08 AM
upload config path question - by El Forum - 10-30-2009, 02:10 PM
upload config path question - by El Forum - 10-31-2009, 11:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB