cancel
Showing results for 
Search instead for 
Did you mean: 

File Download - Resource Type

Former Member
0 Kudos

Hi All,

My requirement is to choose a file of a specifc type only say xml . Only xml files should be visible others should not be visible.

I searched in forums but i didnot get apt solution.

Please anyone help me to solve this problem.

Regards,

Jude.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I dont think their is any property to restrict the file upload to show only .xml files using webdynpro FileUpload UI element.

What you can do is at the server side once the upload is done, based on the mime-types you can respond back to the user that only .xml files are supported for uploads.

Regards

Ayyapparaj

Former Member
0 Kudos

Thanks a lot ....

I have a doubt:

Is this applies to file upload too ?

Regards,

Jude

Former Member
0 Kudos

Hi,

I have mentioned for the file upload only.

In case of file download you always know what client should be allowed. before setting the resource check the mime-type.

Regards

Ayyapparaj

former_member185086
Active Contributor
0 Kudos

Hi,

Try this solution

IPrivateUserDataView.IUploadFileInformationElement element = wdContext.currentUploadFileInformationElement();

if (element.getFileResource() != null)

{

IWDResource resource = element.getFileResource();

if (resource.getResourceType().getFileExtension().equals("xls"))

//Put your condition here

{

//allowed operations

}

Former Member
0 Kudos

Hi All,

Thanks for all your posts....

Regards,

Jude

Edited by: Jude Silvester on Apr 16, 2009 7:36 AM