Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Files upload problem with .dbf and .exe files

 
Arunav Dash
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
In my application i am using struts 2 .
I am trying to do a restricted file upload . And facing a problem with .dbf files upload .

In the interceptor stack i have used the following line .



For me .txt files and .csv files are working fine but .dbf(i.e Microsoft Visual FoxPro Table type ) files are not working .

The error is
Content-Type not allowed: upload "upload_abfbeb3_12033a3b84f__7f9e_00000002.tmp" application/octet-stream.

Please suggest me what should I put for the content type for .dbf .
If i add the application/octet-stream content type then it works , but at same time it allows .exe files also which i don't want . Please suggest me is there a specific content type for .dbf files or insome other ways also I can handel the issue .

With Regards
Arunabh
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Different clients return different mimetypes--there's no single way around the issue, AFAIK, but someone with more knowledge might help. This is more a browser issue, really.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic