This is a migrated thread and some comments may be shown as answers.

Get Temporary FileName

4 Answers 95 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 08 Aug 2013, 09:16 AM
 Hello Community,

I am using the asyncUpload Control to upload a single file.

After the user selects their file I want to get the filename to show them their choice. Now the File is uploaded to the Temporary Folder and the File is renamed.

At the moment I can only get the FileName after the file is uploaded to the TargetFolder, but actually I need the Temporary FileName.

Is there any way to do that?

This is my function:

function OnClientFileSelected(sender, args) {
    var currentFileName = args.get_fileName();
    var fullPath = "C:/TempUpload/" + currentFileName;
    $("#LogoAuswahlPre").attr("href", fullPath);
    $('#LogoAuswahlPre').attr('data-lightbox', 'LogoAuswahl');
}

Thanks for reading

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 08 Aug 2013, 10:26 AM
Hi Daniel,

Straight to the point, the temporary filename is not available on the client due to security reasons.

Thanks,
Shinu.
0
Daniel
Top achievements
Rank 1
answered on 08 Aug 2013, 10:35 AM
Ok.

Is there any other way to preview the User his uploaded File? I don't want to make a Postback. :/
0
Shinu
Top achievements
Rank 2
answered on 09 Aug 2013, 07:05 AM
Hi Daniel,

Please have a look at this forum thread which deals with a similar scenario.

Thanks,
Shinu.
0
Daniel
Top achievements
Rank 1
answered on 09 Aug 2013, 07:33 AM
Okay, thank you!
Tags
AsyncUpload
Asked by
Daniel
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Daniel
Top achievements
Rank 1
Share this question
or