Groups
Sign in
Groups
DSpace Technical Support
Conversations
About
Send feedback
Help
configuring mime types for URLConnect
5 views
Skip to first unread message
Jose Blanco
unread,
May 20, 2019, 10:59:48 AM
5/20/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DSpace Technical Support
I found this post:
https://stackoverflow.com/questions/4212861/what-is-a-correct-mime-type-for-docx-pptx-etc
And there is something in here that says I can do this:
System.setProperty("content.types.user.table","<path-to-file>");
So that in when this line of code is executed:
https://github.com/DSpace/DSpace/blob/master/dspace-rest/src/main/java/org/dspace/rest/BitstreamResource.java#L716
I will get the right mime type ( that's my hope ), so I changed my code to look like this:
System.setProperty("content.types.user.table","path_to_mimetype_file/mimetypes.txt");
return URLConnection.guessContentTypeFromName(name);
But it does not seem to be working. Perhaps I have to set the property somewhere else? Any ideas?
Thank you!
-Jose
Reply all
Reply to author
Forward
0 new messages