Rank: Newbie
Groups: Member
Joined: 2/4/2015(UTC) Posts: 9
|
If there is same filename on server, uploading process will rename and save as xxxxx_0.jpg . How can I get the uploading target filename in function Uploader1_Progress(percent, uploadedFiles, totalFiles, uploadedBytes, totalBytes) or function Uploader1_AfterUpload(response) ? thanks! Code:<script type="text/javascript">
function Uploader1_BeforeUpload(response){
}
function Uploader1_Progress(percent, uploadedFiles, totalFiles, uploadedBytes, totalBytes){
fileName = $au.uploader('Uploader1').files().get(0).name();
alert(fileName);
}
function Uploader1_AfterUpload(response){
alert('ok!');
}
</script>
Edited by moderator Thursday, March 5, 2015 3:55:51 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
Everything you send from the server (e.g. Response.Write in ASP.NET, echo in PHP, etc) you will get as a response parameter in AfterUpload. So you can use it to transmit the real file name to the client. Unfortunately, you cannot do it in the Progress event (because the server code is not executed there yet).
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.