Read Upload File General Properties

2 posts, 0 answers
  1. Venkata
    Venkata avatar
    126 posts
    Member since:
    Nov 2009

    Posted 11 Dec 2014 Link to this post

    Hello,
    I am using RadAsyncUpload for upload files from Client machine to server.
    While uploading i would like to read the file(pdf,word,jpg) properties
    Like File Created Date ,File Modified Date , File Accessed Date, Title, Subject, Author

    How can i read these properties?


    Thank you
  2. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 15 Dec 2014 Link to this post

    Hello Venkata,

    Can you please clarify where do you want to read those properties? The server-side ones are not available until the file upload is completed and FileUploaded event is fired.

    On the client you can use the below code, which works in the browsers that support File API (FireFox, Chrome, Safari and IE9+):

    <script type="text/javascript">
        function fileSelected(sender, args) {
            var input = args.get_fileInputField();
            if (input && input.files) {
                var file = input.files[0];
                // do something with file
                console.log(file);
            }
        }
    </script>
     
    <telerik:RadAsyncUpload runat="server" OnClientFileSelected="fileSelected"></telerik:RadAsyncUpload>


    Regards,
    Genady Sergeev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top