Additional Blogs by SAP
Showing results for 
Search instead for 
Did you mean: 
0 Kudos

Finally managed to get that FileUploader to work.

Seems that the API you get at RT is not the same as what is published...

Anyway, I couldn’t use the onTypeMissmatch API so I had to write a work around:

     importSite: function importSite() {

            var fileExtension = this.fileUploader.getProperty("value").toString();

            var fileNameLength = fileExtension.length;

//            verify the file extension before posting to the server - work around for the onTypeMissmatch api

            if (fileExtension.substring(fileNameLength-3,fileNameLength) !== "zip"){

                this.showError("Only zip files are supported"));

            } else{





I know this is not really a proper file type validation, but I had to start with something...

Wish these things were a little more straight forward 🙂

I also put it on snipix.