Mime Types and site validation?
When validating site, I'm getting the the following warning
Conflict between Mime Type and Document Type
The document is being served with the text/html Mime Type
which is not a
registered media type for the XHTML 1.1 Document Type. The
recommended
media type for this document is: application/xhtml+xml
I work with ASP and I can't figure out why, really, it's
doing this nor
can I figure out how to solve it.
I use: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
and everything validates fine except for this last thing.
.oO(Art)
>When validating site, I'm getting the the following
warning
>-------------------------
>Conflict between Mime Type and Document Type
>
>The document is being served with the text/html Mime Type
which is not a
>registered media type for the XHTML 1.1 Document Type.
The recommended
>media type for this document is: application/xhtml+xml
>-------------------------
>I work with ASP and I can't figure out why, really, it's
doing this nor
>can I figure out how to solve it.
XHTML 1.1 documents should be delivered as
application/xhtml+xml. This
is not recommended, since IE doesn't support this MIME type.
So switch
back to XHTML 1.0 Strict, which can also be delivered as
text/html.
Micha
Similar Messages
-
Hi
after my last update yesterday I have got some problems with some mime-types. Directly after the update pacman said the following:
Warning in file "/usr/share/applications/nautilus-folder-handler.desktop": usage of MIME type "x-directory/gnome-default-handler" is discouraged ("x-directory" is an old media type that should be replaced with a modern equivalent)
Warning in file "/usr/share/applications/nautilus-folder-handler.desktop": usage of MIME type "x-directory/normal" is discouraged ("x-directory" is an old media type that should be replaced with a modern equivalent)
Error in file "/usr/share/applications/oraclexe-readonlinehelp.desktop": "Application/database" is an invalid MIME type ("Application" is an unregistered media type)
Error in file "/usr/share/applications/oraclexe-startdb.desktop": "Application/database" is an invalid MIME type ("Application" is an unregistered media type)
Warning in file "/usr/share/applications/chromium-browser.desktop": usage of MIME type "x-directory/webdav" is discouraged ("x-directory" is an old media type that should be replaced with a modern equivalent)
Warning in file "/usr/share/applications/chromium-browser.desktop": usage of MIME type "x-directory/webdav-prefer-directory" is discouraged ("x-directory" is an old media type that should be replaced with a modern equivalent)
I also get a similar message when I try to install awn-extras from AUR altough it is installable (but not fully functional).
(1/1) Installiere awn-extras-bzr [#####################] 100%
I/O warning : failed to load external entity "/usr/share/gconf/schemas/awn-extras.schemas"
»/usr/share/gconf/schemas/awn-extras.schemas« konnte nicht geöffnet werden: Datei oder Verzeichnis nicht gefunden
It says, that the schema isnt found. Do you have any solutions?
~kiro.oO(Art)
>When validating site, I'm getting the the following
warning
>-------------------------
>Conflict between Mime Type and Document Type
>
>The document is being served with the text/html Mime Type
which is not a
>registered media type for the XHTML 1.1 Document Type.
The recommended
>media type for this document is: application/xhtml+xml
>-------------------------
>I work with ASP and I can't figure out why, really, it's
doing this nor
>can I figure out how to solve it.
XHTML 1.1 documents should be delivered as
application/xhtml+xml. This
is not recommended, since IE doesn't support this MIME type.
So switch
back to XHTML 1.0 Strict, which can also be delivered as
text/html.
Micha -
Get Uploaded File Mime Type and Client Filename
Anyone know how to recover an uploaded file MIME type and
client file name?
I'm writing my own cfx tag to process file uploads and pretty
much have it figured out except to determine the name of the client
file and mime type. The formfield file variable value contains the
path/filename to the CF temp directory, but I need the MIME type,
filename, etc. that is contained int he HTTP Header
(e.g. Content-Disposition: form-data; name="Image";
filename="C:\test.JPG"
Content-Type: image/pjpeg
[empty line])
I'm using the getHttpRequestData() functiont, but it only
gives me the content-type multipart/form-data, leaving out the Mime
type and Content-Disposition (which contains the client file name).Hi Daniel,
do you use EPG, mod_plsql or APEX Listener? Have you changed the connection mechanism after upgrading to 4.2.1?
If you use the APEX Listener, which version do you use? Which browser and version do you use to upload the file? Does it reproduce with other browsers as well?
Regards
Patrick
Member of the APEX development team
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf -
Automatically open file based on MIME type and file extension
We have an app that is registered to handle custom MIME type and file extension. This works perfectly on IE and FireFox causing them to download the file to a temp folder and then launch our app associated with MIME type and file extension with command line to the downloaded file. On Safari however this does not work. It opens up a download window and shows that it has downloaded the file with no option to open it.
hello, you can file a bug on bugzilla.mozilla.org if you want to include your plugin in the plugin finder service...
[https://wiki.mozilla.org/PFS] -
Revision: 1607
Author: [email protected]
Date: 2008-05-07 17:02:39 -0700 (Wed, 07 May 2008)
Log Message:
Set svn:mime-type and svn:eol-style on LICENSE and NOTICE files in the lib directory.
Modified Paths:
flex/sdk/branches/3.0.x/lib/batik-NOTICE.txt
flex/sdk/branches/3.0.x/lib/commons-discovery-LICENSE.txt
flex/sdk/branches/3.0.x/lib/xalan-NOTICE.txt
flex/sdk/branches/3.0.x/lib/xerces-LICENSE.txt
Property Changed:
flex/sdk/branches/3.0.x/lib/batik-LICENSE.txt
flex/sdk/branches/3.0.x/lib/batik-NOTICE.txt
flex/sdk/branches/3.0.x/lib/commons-collections-LICENSE.txt
flex/sdk/branches/3.0.x/lib/commons-discovery-LICENSE.txt
flex/sdk/branches/3.0.x/lib/commons-logging-LICENSE.txt
flex/sdk/branches/3.0.x/lib/commons-logging-NOTICE.txt
flex/sdk/branches/3.0.x/lib/mm-velocity-LICENSE.txt
flex/sdk/branches/3.0.x/lib/mm-velocity-NOTICE.txt
flex/sdk/branches/3.0.x/lib/xalan-LICENSE.txt
flex/sdk/branches/3.0.x/lib/xalan-NOTICE.txt
flex/sdk/branches/3.0.x/lib/xerces-LICENSE.txtThanks for your attention.
In the above logs, higher resolutions seems to be detected on both screens, hence my surprise :
[ 391.631] (II) intel(0): Printing probed modes for output LVDS1
[ 391.631] (II) intel(0): Modeline "1600x900"x60.0 110.00 1600 1664 1706 2010 900 903 906 912 -hsync -vsync (54.7 kHz eP)
[ 391.897] (II) intel(0): Printing probed modes for output HDMI1
[ 391.897] (II) intel(0): Modeline "1680x1050"x59.9 119.00 1680 1728 1760 1840 1050 1053 1059 1080 +hsync -vsync (64.7 kHz eP)
If it can help here is also my current xrandr output (after having called it manually to use the preferred resolution of each screen)
itanguy ~ $ xrandr
Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 8192 x 8192
LVDS1 connected 1600x900+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
1600x900 60.0*+ 40.0
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 434mm x 270mm
1680x1050 59.9*+
1280x1024 75.0 60.0
1152x864 75.0
1024x768 75.1 60.0
800x600 75.0 60.3
640x480 75.0 60.0
720x400 70.1
DP1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
HDMI3 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
DP3 disconnected (normal left inverted right x axis y axis)
If needed, I may reboot and provide xrandr output after boot (it will be 1024x768), or could other logs help you ? Please ask... -
Site content types and site columns were absent
hi,
i have seved a sub site as a template which includes 20+ doc libs with 20+ site content ctypes which includes 15+ site columns and then i have used this savedsite template in one site collection and implemented my
custom web parts and upload document fun. successfully.
now i have created another new site collection and forgot to create site content types and site columns as we have seen the site columns in the saved site template already.
now i realized that those site content types and site columns were not there but the strange thing is that i am able to uplaod the documents into those document libraries which are not associated with site content types, without any error.
Can I create the same in my new site collection ? since i have already created many many sub sites based on the saved site templates tested the functionality ,i dont wanna delete the template recreate all the sites again in order
to save the time.
Now pls advice:
1) if site columns / site contents were not existing at the site collection level, will this affect my func. in future?
2) is there any automated way fo creating site columns, site content types, associateing these site content types with doc libs programmatically like power shell/ sp object model API.
3) would like to any programmatic way of creating hundreds of sub sites based on the saved site templates in myw eb application/ site collection.Hi,
We can create site columns, site content types or sub-sites using SharePoint Server Object Model.
The following articles for your reference:
SharePoint 2010: Create Site Columns and Content Types using C#.Net
http://social.technet.microsoft.com/wiki/contents/articles/20267.sharepoint-2010-create-site-columns-and-content-types-using-c-net.aspx
How to: Add a Content Type to a SharePoint List
http://msdn.microsoft.com/en-us/library/office/aa543576(v=office.14).aspx
Create Sites Using Custom Site Templates in SharePoint 2010
http://www.c-sharpcorner.com/UploadFile/63e78b/create-sites-using-custom-site-templates-in-sharepoint-2010/
How to create sub site with custom site template through PowerShell
http://fangdahai.blogspot.com/2012/08/how-to-create-sub-site-with-custom-site.html
Best regards
Dennis Guo
TechNet Community Support -
When visiting a site I frequent I tried to download a linked .pdf file. Previously I've used Firefox 7.0.1 to download the link with no problem. Using Firefox 8 however I the browser does not recognize the .pdf link's mime type. Instead of recognizing the download link as a .pdf file Firefox 8 tries to download it as "index.php". Firefox 8 does this with .doc files and .txt files as well. When I downgrade to 7.0.1 again the problem disappears.
Hi hakmacpace,
I'd try starting Firefox in [[Safe Mode]]. If you don't have the issue while all of your add-ons, extensions, and themes are disabled, you can try adding them back in one by one until you find the culprit. You should look at the [https://support.mozilla.org/en-US/kb/Troubleshooting-extensions-themes Extensions and Themes troubleshooting guide ] and the [[Troubleshooting plugins]] article as well.
You could also try [https://support.mozilla.org/en-US/kb/Managing-profiles?s=create+a+new+profile&r=2&e=es&as=s#w_creating-a-profile Creating a new profile].
Hopefully this helps! -
Mime-type and/or extension of script file
I would like to generate a script file dynamically on my web server and then have it downloaded to my users such that they can simply double-click the file and have it execute. I've gotten pretty close by using the ".command" extension, but it still requires a "chmod +x filename" after download in order to work properly. Is there another extension or a mime-type that I could use that would cause Mac OS X 10.4 and/or 10.5 to grant execute rights to the user that downloaded it? I'm not married to it being shell script if it can be done with AppleScript, Ruby, etc that would be great. It basically just has to be text file (non-binary format) so I can dynamically generate it on the server side.
Hi Daniel,
do you use EPG, mod_plsql or APEX Listener? Have you changed the connection mechanism after upgrading to 4.2.1?
If you use the APEX Listener, which version do you use? Which browser and version do you use to upload the file? Does it reproduce with other browsers as well?
Regards
Patrick
Member of the APEX development team
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf -
Webdynpro to limit MIME types and size
Hi,
I need to write an web dynpro application to limite the file type and size using IWDFileUpload API, does anyone has some suggestion ?
Thanks a lot.
Kind regards
Ben.J.Hi Ben,
I think you can restrict the file type and and also check the file size before uploading the file. You need to write the logic to check out the file type.
Use the following code to check restrict the file upload of only txt file...
IPrivateTestView.ITestElement pf =
wdContext.nodeTest().currentTestElement();
IWDMessageManager mgr = wdComponentAPI.getMessageManager();
if (pf.getFileResource().getResourceType().getFileExtension() != null
&& pf
.getPatchResource()
.getResourceType()
.getFileExtension()
.equalsIgnoreCase(
"txt")) {
// Check if file size is in valid range.. call getFileSize()
mgr.reportSuccess("File can be uploaded");
} else {
mgr.reportException("Kindly upload ont TXT files", false);
And use following code for calculating File Size:
private String getFileSize(IWDResource resource) {
InputStream stream = null;
DecimalFormat myFormatter = new DecimalFormat("###.##");
double size = 0;
String unit = "";
try {
stream = resource.read(false);
size = stream.available();
if (size < 1024) {
unit = " Bytes";
} else if (size < 1048576) {
size = size / 1024;
unit = " KB";
} else if (size < 1073741824) {
size = size / 1024 / 1024;
unit = " MB";
} catch (IOException e) {
wdComponentAPI.getMessageManager().reportException(
e.getLocalizedMessage(),
true);
} finally {
if (stream != null) {
try {
stream.close();
} catch (IOException e) {
wdComponentAPI.getMessageManager().reportException(
e.getLocalizedMessage(),
true);
return myFormatter.format(size) + unit;
//@@end
This way you can restrict the users. As far as I know there is no standard way of restricting the same
Hope it helps
Regards
Abhinav -
Image size and mime type.. non-java guy needs help
Image size, mime type.. non-java guy needs help
Im not at all familiar with java so this is really weird for me to work out. I?ve been doing it all day (and half of yesterday).
Im trying to write a custom clodFusion tag in java that gets the width, height, size and MIME types of a given file. I?ve been trying to get it to work on the command line first. I can get the width and height but cant get the size and the MIME type.
Here is what I got
/*import com.allaire.cfx.*;*/
import java.awt.image.renderable.*;
import javax.media.jai.*;
import com.sun.media.jai.codec.*;
import java.io.*;
import java.util.*;
public class ImageInfo {
private RenderedOp image = null;
private RenderedOp result = null;
private int height = 0;
private int width = 0;
private String type = "";
private String size = "";
public void loadf(String file) throws IOException
file = "80by80.jpg";
FileSeekableStream fss = new FileSeekableStream(file);
image = JAI.create("stream", fss);
height = image.getHeight();
width = image.getWidth();
System.out.println(height + "\n");
System.out.println(width);
System.out.println(type);
public static void main(String[] args) throws IOException {
ImageInfo test = new ImageInfo();
test.loadf(args[0]);
can anyone please help me out to modify the above so I can also print the mime type and the file size to screen.
thanks for any helpany suggestions?
-
Hi,
i'm curious to know if i'm the only that have ugly mime-type icons for LibreOffice files (.odt .doc .ods ...)
Before
I like to see the original LibreOffice mime-type icons, so after a lot of research on the web i've found the solution.
Following this http://standards.freedesktop.org/shared … atest.html
The applications mime-type action are stored under /usr/share/mime/packages.
Here you can find /usr/share/mime/packages/libreoffice.xml the LibreOffice mime-type file and if you open it you'll find something like that:
<mime-type type="application/vnd.oasis.opendocument.text">
<comment>OpenDocument Text</comment>
<glob pattern="*.odt"/>
<magic>
<match type="string" offset="38" value="application/vnd.oasis.opendocument.text"/>
</magic>
</mime-type>
In order to see the original icon in Nautilus / Dolphin you simply have to add a line of code that call the proper mime-type icon for example:
<icon name="libreoffice-oasis-text"/>
You have to do this for every mime-type type.
The follow example is for "OpenDocument Text"
<mime-type type="application/vnd.oasis.opendocument.text">
<comment>OpenDocument Text</comment>
<glob pattern="*.odt"/>
<icon name="libreoffice-oasis-text"/>
<magic>
<match type="string" offset="38" value="application/vnd.oasis.opendocument.text"/>
</magic>
</mime-type>
And after this work you can see something like this in Nautilus / Dolphin
After
If someone if interested i can post the updated libreoffice.xml file.
mod edit: Hello gspe, please read Forum Etiquette: Pasting Pictures and Code. Thanks. --fsckd
Last edited by fsckd (2011-11-07 20:05:21)After a bit more research i've found the correct solution for the problem.
The problem actually is that the libreoffice mime-type icons follow a wrong naming.
For example if you go in /usr/share/icons/gnome/48x48/mimetypes
libreoffice-oasis-text.png
shoud be
application-vnd.oasis.opendocument.text.png
And so on for all entry in /usr/share/mime/packages/libreoffice.xml -
How to get the mime type of the workflow attachment attached to workitem id
Hi Experts,
I can attach different types of attachment to the workitem id, lets suppost the attachment type attached is pdf, for this attachment I have an requirement to send the mime type as well. In this case the mime type is 'application/pdf' for pdf files.(for text file it is 'text/plain' and for zip file it is 'application/zip' and so on)
Do I have any place in ABAP world where I can get the mime type for different types of attachments.
I dont want to hard code the mime types, and I have checked the transaction 'SMW0', but not sure if this is the correct place to get the mime type.
Do you see any other way or tables which stores all these mime types.
Any help/suggestion would be appreciated.
Thanks and Regards,
Neerup.Hello,
Perhaps this can help:
http://help.sap.com/saphelp_nw04/helpdata/en/ad/ebe5cc1d75aa43a2871717d76f475d/content.htm
If you want to know the table name, turn on tracing (ST05) when accessing the MIME types.
regards
Rick Bakker
Hanabi Technology -
XDG standards updated re MIME-type associations + default applications
In April the XDG standards regarding Association between MIME types and applications was updated, and the changes are quite significant. For example, to specify default applications you should now list them in the [Default Applications] section of a mimeapps.list; placing them in the [Added Associations] section is no longer sufficient. Also, mimeapps.list files may now also be located in the $HOME/config ($XDG_CONFIG_HOME) and /etc/xdg ($XDG_CONFIG_DIRS) directories. The file defaults.list is confirmed as deprecated, as well as a mimeapps.list file in $HOME/.local/share/applications ($XDG_DATA_HOME/applications).
Just to muddy the waters further, there are $desktop-mimeapps.list ($desktop is the desktop environment: kde, gnome, etc) which may accompany mimeapps.list files on all the paths!
I'm implementing these new standards in my ayr launcher, but no doubt there will be many applications which will lag behind these new standards. The biggest immediate problem will probably be with file managers which often write the default associations they create to the [Added Associations] section in $HOME/.local/share/applications/mimeapps.list.
This will not be much fun, but if it's standardising better, then so be it!
Edit: There is a worked example, but there seems to be a mistake in this - $XDG_CONFIG_DIRS should come before $XDG_DATA_HOME according to the standard.
Also, the Default applications page on the Wiki is going to need a substantial revamp.
Edit2: Overview of main changes
Last edited by ninian (2014-06-18 23:27:39)Have now updated the Wiki section on:
Using MIME types and desktop entries
to reflect the new changes. -
Identifying the correct MIME type for file uploads
How does Apex identify the MIME type of an uploaded file? I have a page that uploads a file and accesses it via APEX_APPLICATION_FILES. That works fine. The problem is that, for certain file types, the mime_types column is "application/octet-stream" instead of the correct file type. I think it's using the Content-Type from the client browser, though I'm not quite sure. Is there any way to override this server-side in Apex?
I'm running Apex with mod_plsql. Adding an AddType directive to Apache and adding the correct association to the mime.types file did not work.Hi,
I also noticed this - it seems that Microsoft's 4 char extensions like .docx are not being recognized by application type so that either the web server or mod-plsql is defaulting to the "application/octet-stream" mime type which refers to a file with binary content - instead of the traditional "application/msword" mime type you would expect.
If you know, at the point of insert into your database table, both the mime type and file name, one workaround would be to check if the mime type is 'application/octet-stream' and the file's extension is ".docx" or other likely extensions and then treat it as mime type 'application/msword", etc.
Not really a solution but might be sufficient workaround depending on your situation.
Ted
Edited by: Ted Martin on Oct 25, 2012 7:27 PM -
How to set mime types for applet in iAS sp3?
Hi,
Please refer to Adding Mime types and let me know if that address to solve your problem.
Regards
Ganesh .R
Developer Technical Support
Sun Microsystems
http://www.sun.com/developers/support
Maybe you are looking for
-
How to find inflection point in graph when dx is very small
Hello, I'm trying to sort through position data from a feedback pot to calculate linearity of movement as part of a testing procedure. An image of the data is attached. I want to delete all data in the 'flat' part, in order to do a linear fit and R^2
-
Landscape and Portrait Orientation Problems
Hello everyone, I am working on my first iBook using iBook Author. I am having a heck of a time understanding how to make something look good in both Landscape and Portrait orientation. For example, I am curious how to make the spaces between paragra
-
Can someone please list the steps required for saving a Crystal report with one dynamic prompt to the Enterprise. It is working correctly in Designer, but can not be saved to Enterprise. Obviously from reading the online helps, I need to create a L
-
I have Adobe Premiere Elements 7. When I'm trying to open my video file to edit it, the programme says "This type of file is not supported, or the required codec is not installed". So what can I do?
-
Force a delete and push new filws to the client
HI, We need to update an application published in Olite. This application is a .Net web site, pre-compiled. Every time the application changes, we need OracleLite to delete all the files and then push the new ones to the mobile units. Actually, Olite