Welcome Guest, Not a member yet? Register   Sign In
How to change permissions of uploaded file?
#1

[eluser]admiral[/eluser]
Hello,

after moving my project to a new server I've got a problem with permissions of uploaded files (using File Uploading Class). How can I define file permissions before uploading or change it after uploading (php function chmod or something)?
#2

[eluser]codebreaker21[/eluser]
There is a php function for this : chmod
http://php.net/manual/en/function.chmod.php
If you get an error while using it you can try this :
http://www.php.net/manual/en/function.chmod.php#68384
Codebreaker21.
#3

[eluser]admiral[/eluser]
Yes, I know this function. But I have no idea how to use it in conjunction with CI's do_upload(). I mean, I don't know how to determine the name of saved file which doesn't have to be the same as the name of local file.
#4

[eluser]codebreaker21[/eluser]
http://ellislab.com/codeigniter/user-gui...ading.html
Take a look at $this->upload->data() .This should be exactly what you need.
#5

[eluser]admiral[/eluser]
Thank you very much Smile I haven't noticed that.




Theme © iAndrew 2016 - Forum software by © MyBB