Reputation: 2480
I have tbar with filefield like this
tbar: [{
xtype: 'form',
enctype: 'multipart/form-data',
name: 'myforms',
border: false,
items: [{
xtype: 'filefield',
name: 'myname[]',
buttonText:'add'
}]
}]
I try to upload zip file, mp4 file,... but not working. it's working with simple type example: txt, doc,...
my submit using
form.submit({
method: 'POST',
enctype: 'multipart/form-data',
....
});
How can i fix that thanks
Edit
I try more and i see if file > about 2M, it will not upload. :( I don't catch any size of file more 2M. How can i upload more 2M thanks
Upvotes: 1
Views: 2308
Reputation: 300
You can do like this :
uploadFile: function(request) { var file = request.file; data = new FormData(); data.append('file', file); Ext.Ajax.request({ url: url , scope: this, rawData: data, headers: {'Content-Type':null}, success: function(response) { var responseData = Ext.JSON.decode(response.responseText, true); } }); }
and inside your application.properties in spring boot:
spring.http.multipart.max-file-size=50MB spring.http.multipart.max-request-size=50MB if you are using spring boot.
Upvotes: 0
Reputation: 17860
Most likely it's limitation on your server side. I know that IIS for example has configuration option allowing you to change that default size - that is if you're using IIS + WCF or something similar.
What's your server back end?
Upvotes: 1