wood burning stoves
The moose likes Struts and the fly likes Files upload problem with .dbf and .exe files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Files upload problem with .dbf and .exe files " Watch "Files upload problem with .dbf and .exe files " New topic

Files upload problem with .dbf and .exe files

Arunav Dash

Joined: Oct 04, 2007
Posts: 4
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
David Newton

Joined: Sep 29, 2008
Posts: 12617

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.
I agree. Here's the link: http://aspose.com/file-tools
subject: Files upload problem with .dbf and .exe files
It's not a secret anymore!