Welcome Guest, Not a member yet? Register   Sign In
Change the Uploaded file name?
#1

[eluser]solid9[/eluser]
hi guys

How do I changed the uploaded file name?

The manual say this code below is helpful,
Code:
$this->upload->data()

But I don't know how to use it.

So how do I change the file name of the uploaded file?

Can you guide me.

Thanks in advanced.
#2

[eluser]Aken[/eluser]
Read the user guide, it's one of the setting preferences.

Or if you need additional renaming, use native PHP rename().
#3

[eluser]solid9[/eluser]
Okay I read the manual.

How do I access the file_name

I did this below,
Code:
echo $this->upload->data('file_name');

but it doesn't work.
#4

[eluser]solid9[/eluser]
I tried this codes below as well, but it doesn't catch it.
Code:
$this->input->post('userfile');

#5

[eluser]Samus[/eluser]
[quote author="solid9" date="1338000143"]I tried this codes below as well, but it doesn't catch it.
Code:
$this->input->post('userfile');

[/quote]

Code:
$success = $this->upload->data();
$file_name = $success['file_name'];

Other indexes are in documentation
#6

[eluser]solid9[/eluser]
@samus

thank you very much.




Theme © iAndrew 2016 - Forum software by © MyBB