on 2017 Nov 10 9:02 PM
Hi Experts,
Kindly suggest some idea to fix this. I'm using fileupload for file attachment. Converting the files into Base64 format and post the file to backend via oData. It allows max file size as 500kb. But my requirement was upto 75mb files. Conversion of base64 response was very slow. Any suggestion to make the Base64 conversion fast or any lib files to convert. Please suggest.
What is the Maximum file size for FileUpload control.
Code:
function(oEvent){
var oFileuploader = this.getView().byId("fileUploader");
var file = jQuery.sap.domById(oFileuploader.getId() + "-fu").files[0];
var base64_marker = 'data:' + file.type + ';base64,';
var reader = new FileReader();
reader.onload = (function(theFile) {
return function(evt){
var binaryString = evt.target.result.indexOf(base64_marker) +base64_marker.length;
var base64 = evt.target.result.substring(binaryString);
console.log("base64 : "+base64);
};
})(file);
reader.readAsDataURL(file);
},
Request clarification before answering.
Hi Vinothkumar T,
You can use AJAX to upload files faster to your database. Also, NetWeaver Gateway doesnot restrict any file size for OData, please refer the foll. links for more information :
https://archive.sap.com/discussions/thread/3548399
Regards,
Arjun Biswas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
30 | |
8 | |
7 | |
6 | |
6 | |
6 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.