This content has been marked as final. Show 13 replies
if your php file's name is load.php:
The send method will do it, but the send method targets the browser for the response, so probably want to use sendAndLoad there instead of just send
Oh hang on that's an upload script... do you want to upload at the same time?
can you please help me more.
attached is my FileReference code. where should i put the script you gave me in order to rename the loaded image name?
The easiest way is actually to pass the name as a get variable to your upload script. There's an example of the same question having been answered not so long ago. I'll find it
The example using GET and not POST for the new name is here:
There's also another example using POST. But it requires flash player 9 as a minimum I believe. Its also here. I think the topic belonged to a user with the name cicnats.
unfortunately i am not familiar with filereference.
can you add the correct code in my script?
Sorry I can't right now, I'm going back to work. I'll take a look at it in a few hours time if someone else hasn't answered. Meanwhile you could read up on it a little bit and give it a try :-) You might surprise yourself!
thank you - i will wait till you have time. i am trying to solve this problem for days...
have a nice day.
You've posted a lot of code there. I'm unable to go through all of it and check it for you. (Its too much to expect I think). I'm going to assume that the only problem you have is sending the name variable to the upload script along with the file upload...
So the first link I posted, the GET approach is probably all you need.
Go back to your first code post (don't put anything related to LoadVars in this. Its not relevant for what you want to do).
change the line:
That's just a demo.You will need to get the value of newname from whereever it makes sense for you. (e.g from and input Textfield or whatever)
In your PHP script change the line:
$name = $_POST['name'];
$name = $_GET['name'];
Assuming everything else is working as it should, then that should work.
THANK YOU THANK YOU THANK YOU
HAPPY NEW YEAR
No problem. You're welcome. Happy New Year to you too.