Get Temporary FileName

5 posts, 0 answers
  1. Daniel
    Daniel avatar
    35 posts
    Member since:
    Jan 2011

    Posted 08 Aug 2013 Link to this post

     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

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 08 Aug 2013 Link to this post

    Hi Daniel,

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

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Daniel
    Daniel avatar
    35 posts
    Member since:
    Jan 2011

    Posted 08 Aug 2013 Link to this post

    Ok.

    Is there any other way to preview the User his uploaded File? I don't want to make a Postback. :/
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 09 Aug 2013 Link to this post

    Hi Daniel,

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

    Thanks,
    Shinu.
  6. Daniel
    Daniel avatar
    35 posts
    Member since:
    Jan 2011

    Posted 09 Aug 2013 Link to this post

    Okay, thank you!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017