# Get new name of file after uploading it to server

**URL:** <https://forum.kirupa.com/t/get-new-name-of-file-after-uploading-it-to-server/297378>\
**Category:** flash\
**Created:** [October 1, 2009, 7:43am UTC](https://forum.kirupa.com/t/get-new-name-of-file-after-uploading-it-to-server/297378 "2009-10-01T07:43:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![patspats](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@patspats](https://forum.kirupa.com/u/patspats)\
**Post date:** [October 1, 2009, 7:43am UTC](https://forum.kirupa.com/t/get-new-name-of-file-after-uploading-it-to-server/297378/1 "2009-10-01T07:43:50Z")

</div>

Hi there

I want to upload multiple files. For this I used FileReference and it works fine. I m able to upload the files properly.

There is small problem:-

When i upload a file i change its file name from “pic1.jpg” to something like “asdfwer.jpg”

Now i want to get this new name of a file - so for that i set cookie using setcookie() in php. But the problem is “Cookie is not being set” I dont get the reason for that…for example

setcookie(“NewName”,“asdfwer.jpg”);

Basically i want to get the new name of a file in any way…setting cookie was just a trick to do that but unfortunately its not working

Please somebody can suggest a solution for this problem ???

Thanks a lot for any help in advance

Regards
