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

Read Upload File General Properties

1 Answer 68 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Venkata
Top achievements
Rank 1
Venkata asked on 11 Dec 2014, 09:50 PM
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

1 Answer, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 15 Dec 2014, 08:51 AM
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.

 
Tags
AsyncUpload
Asked by
Venkata
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Share this question
or