Questions tagged [mime-types]
An Internet media type or MIME type (named for Multipurpose Internet Mail Extensions) is a two-part identifier for file formats on the Internet.
3,436
questions
0
votes
0
answers
20
views
Is it possible to check if a mime type is supported by browser to display?
I want to display a "open in new tab" button on my blob files if the mime type of this file is supported by the browser (Chrome/Firefox/Edge). Currently I only checking if the mime type of ...
0
votes
0
answers
11
views
Why is `application/x-www-form-urlencoded` the default mime type for forms, if it is non-standard?
In this SO answer we can read that
The x- prefix of a MIME subtype simply means that it's non-standard.
while in this W3C spec we can read:
application/x-www-form-urlencoded
This is the default ...
0
votes
1
answer
34
views
MERN app display JSON data instead of page on reload
I created a web app using MERN stack (React app was created with Vite). Locally everything works fine, but on the server, I keep having a bunch of bugs (I'm on Hostinger VPS).
At first, I had a MIME ...
1
vote
1
answer
50
views
rack app serving js file with Content-Type set yet browser says Mimetype is ""
I have a rack app:
class Responder
def self.call(env)
path = env['PATH_INFO']
path = File.extname(path).blank? ? 'index.html' : path
extension = File.extname(path)
headers = {
'...
0
votes
0
answers
16
views
I tried downloading a file using its mime type in react js but when the pdf gets downloaded it has no content just the correct no. of pages
This is the function to download it getting the mime type along with other values from the api call for each document in the parent element
const downloadDocument = (handleString, mimeType, ...
0
votes
0
answers
21
views
text/plain not present in mail msg from microsoft account
The same message was sent from a microsoft 365 to my microsoft 365 and
to my gmail. However, mutt sees them differently: in the first case
I 1 <no description> [text/html, quoted, ...
0
votes
1
answer
41
views
Writing .xlsx file to disk and reading into a byte array results in error when attempting to open the file
Using VB.NET, we write a .xlsx (Excel Workbook) file to disk and then read into a byte array. Opening the Excel Workbook using File Explorer works correctly, but writing the byte array to the Response ...
0
votes
1
answer
33
views
How to get python-magic to identify file type of docx correctly instaead of as application/zip?
I'm developing a website which allows users to submit files and then I use Python to detect the file type. I learned that all MS Office files are actually zip files but how do I determine that it ...
2
votes
2
answers
62
views
Blob generated from base64-encoded png image within FormData instance recognized as application/octet-stream on server-side
Okay so I have a correctly, base64-encoded png image, that I convert into a Blob as such:
const match = imgBase64String.match(/^data:image\/(\w+);base64,/);
if (!match) {
throw new Error("...
0
votes
2
answers
71
views
How to I add a MIME type for a single specific file without extension in IIS?
I've been getting a lot of 404 notifications on the .well-known/traffic-advice location on my server. After doing some research it turns out the Chrome Privacy Preserving Prefetch Proxy tries to find ...
-1
votes
1
answer
108
views
Refused to execute script from 'link for the script' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled
I'm encountering an issue in my Angular application, and I could use some assistance in resolving it. The primary problem is that I'm receiving 404 errors for various resources when running my ...
0
votes
0
answers
73
views
Why does my static css file is not reflecting on my browser using flask?
I should have a webpage with a purple background and blue font color, but my browser is rendering it as plain HTML without any CSS styling. The console returns a status code of 200, indicating that ...
1
vote
1
answer
69
views
TypeError: Cannot read properties of undefined (reading 'split') when submitting form
I'm making a register page for a special type of user and the form has a input type file, which is the user profile pic, but it seems like the file is not sent to the server-side when the form is ...
0
votes
1
answer
38
views
showing wrong mime type in go [duplicate]
I am really new to Go. Here's my code
package main
import (
"encoding/base64"
"fmt"
"net/http"
"os"
"strings"
)
func main() {
...
0
votes
0
answers
22
views
Ext JS 6.2.0 Failed to upload an apk file to the web server
I'm new on ExtJS. I need to upload an apk file to the server web. That work fine on Chrome, Microsoft Edge and Opera navigators but don't work on Firefox (It doesn't seem to correctly detect the file ...
0
votes
0
answers
126
views
My Github TypeScript website is not showing because the server responded with a MIME type of "application/octet-stream"
I am trying to build a website using TypeScript, Vite and Node. My website runs locally but I'm getting the error when trying to open it as a Github hosted page.
The full error:
/src/main.tsx:1 Failed ...
0
votes
0
answers
23
views
Problem Configuring Static in OpenLiteSpeed with Django Project (www.menuweb.cl)
The problem.
traditional-italian-food-world-tourism-day.jpg:1 - Failed to load resource: the server responded with a status of 404
/#:1 - Refused to apply style from 'https://menuweb.cl/python/static/...
0
votes
0
answers
43
views
Resolve a custom mimetype with apache Tika
I have a .xml file with content like
<cesDoc version="v1" type="text" TEIform="TEI.2">
<cesHeader type="text" version="v1" TEIform="...
0
votes
2
answers
56
views
MIME Type issue for datetime picker
I am getting the below error, however the js file is accessible
Refused to apply style from 'bootstrap-datepicker.min.js' because its MIME type ('application/javascript') is not a supported stylesheet ...
0
votes
0
answers
89
views
When running yarn build, the Output file is not getting generated with Webpack 5 and throwing MIME type error in console using ReactJS application
I am working with upgrading Node.js version from 16.x to 18.16.1 and webpack version from 4.x to 5.x. and then configuring respective webpack.config.js file where facing MIME type issue and looks ...
0
votes
2
answers
51
views
ParseFilePipeBuilder throws error for wrong filetype, but file gets uploaded as well despite the error , NestJs v10^
I'm using new ParseFilePipeBuilder() to validate the uploaded file type. It does throw error for wrong file type. But it also uploads that wrong file type file as well. That I don't want , I want to ...
0
votes
0
answers
17
views
How to initialize mimetypes library in AWS Lambda?
mimetypes does not recognize files like the following: xlsx, docx, etc., so I want to initialize my mime_types.txt file so that it can recognize those file types.
I know you need to initialize the ...
0
votes
0
answers
100
views
Send Multipart Form Data from c# client through nginx upload server to ASP.NET Service
I am trying to store images from a C# client in a Nginx server using the nginx upload module .
I have set up the Nginx as a Docker container and connected it over a network to an ASP.NET Core service ...
0
votes
1
answer
73
views
Firebase/React Router single page application doesn't load correctly on refresh
Using react router and Firebase hosting to run a website, when refreshing or navigating to a specific path I get a Mime type error.
Example: I can navigate to website.com/projects just fine
When ...
1
vote
1
answer
100
views
How to get MIME Type and data stored in clipboard in qt with c++
I want to get the Mime Type and data stored in a clipboard and transfer it via network to another device but it seems like Qt doesn't provide a Straightforward way to do it, How to accomplish this ?
I ...
0
votes
0
answers
31
views
How does HTTP Head request get the accurate content-type?
I have a media server. I have files of different types uploaded there.
When I make a HEAD request, I get the Content-Type header in the response. I was wondering if the Media server uses the file ...
0
votes
0
answers
24
views
Call ts file from html getting "Refused to execute script" error
I am calling a typescript file in a html file but am getting the following error:
Refused to execute script from 'http://localhost:8000/index.ts' because its MIME type ('video/mp2t') is not executable....
0
votes
0
answers
31
views
Module function magic.from_file returns different result in Windows and Centos
The from_file in python package python-magic returns different results for the same file in Windows vs Centos.
For e.g on Windows,
from magic import from_file
print(from_file("path\to\file_name....
0
votes
0
answers
25
views
Why is multipart form data file upload got different content types on different systems?
I am hosting a page which has the following HTML form:
<form action="#" id="upload_form">
<input id="file" type="file" name="update" ...
0
votes
0
answers
26
views
Attachments getting corrupt/not openable after composing mail using nodemailer mail-composer and Gmail API
I have been trying to create a simple mailer API hosted on AWS Lambda, using Gmail APIs.
I am parsing multipart/form-data using `aws-lambda-multipart-parser` . I created the mail body using Nodemailer'...
1
vote
0
answers
57
views
Is it possible to recode an EML file from Base64 to UTF-8?
I have an EML file which contains Base64. Is it possible to recode it to be UTF-8? Headers:
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
1
vote
1
answer
48
views
Cannot do rails s because mime-types
I am trying to run an application from another computer.
I'm on ruby version 2.6.3 and rails version 5.0.7.2
It may be because of the mime types
But when I do rails s here is the error it gives me
/...
0
votes
1
answer
131
views
Correct MIME Type for .msg file download using ByteArrayResource
I have a files stored in AWS S3 , and I do have a provision of getting hold of all the information of that file in one java object DocumentResult.
DocumentResult{
private byte[] result;
private ...
0
votes
1
answer
176
views
Accept text/plain while @Consumes has application/json
We migrated a DropWizard based REST service to Quarkus based one (version: 2.16.7.Final) using quarkus-resteasy-reactive extension. The APIs where the @Consumes annotation has application/json started ...
0
votes
0
answers
26
views
How can tzdata.zi file can be identified not as a .zi file Unambiguously?
I've got the tzdata.zi file (appears under the mcr.microsoft.com/dotnet/sdk:6.0 docker image).
From what I know it's a "zone info" file.
Unfortunately it got the same extension of .zi (which ...
0
votes
0
answers
28
views
Used relative file path to link CSS, but file doesn't load and gives an error (MIME type not supported and strict MIME checking is enabled)
I have linked my CSS file in toDo.html like this: <link rel="stylesheet" href="../../reset.css">.
This is what the directory looks like:
Web Dev
|
- reset.css
- ...
0
votes
0
answers
22
views
Refused to execute 'blah blah blah Google analytics id= ****' as script because "X-Content-Type-Options: nosniff" was given
I am trying to help a lady out who was sold a crappy Wordpress site. Trying to get her some google analytics set up so I created her a project on my analytics account and gave her the javascript code ...
0
votes
1
answer
55
views
Determining File Type from Content URI without Extension
I am currently working with content URIs in my Android application, and I need a reliable way to determine the file type of a given URI. The challenge is that these URIs do not have any file ...
0
votes
0
answers
60
views
This SourceBuffer has been removed from the parent media source raised while appendBuffer
I try to stream a video through a websocket. I made at first muted video transfer e.g. client -> websocket -> clients. All working fine with that. But when I try to get a video with sound from ...
0
votes
0
answers
33
views
Apache tika behavior: misidentifies plain text as rtf, when filename has rtf extension
I am new to Apache Tika. I am using:
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId>
<...
0
votes
0
answers
114
views
Expected a JavaScript module script but the server responded with a MIME type of "text/plain"
It's the whole day I'm stuck with this error. I did an angular app, if I run it from visual studio code terminal it works fine. Then I Dockerized this app, I remember firstly it was working, then I ...
0
votes
0
answers
40
views
How can I fix MIME type errors when uploading my website to 000Webhost?
Can someone help me to fix some bugs?
I have a free hosting by 000Webhosting. But at the last update it goes wrong.
Screenshot of error
Everything works perfectly on my local host. Everything looks ...
0
votes
0
answers
13
views
CSS and Javascript is not working in the browser
p://127.0.0.1:5500/COUNTDOWN%20APP/style.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
This type of error is showing in the ...
0
votes
1
answer
102
views
How to properly configure app.yaml to serve JavaScript files as text/javascript?
JavaScript files are being served as text/plain in App Engine, regardless of what I do to change that:
'content-type' header media type value should be 'text/javascript', not 'text/plain'.
Anyone have ...
0
votes
0
answers
152
views
Mime type disallowed and failure loading polyfills, main and runtime.js files
enter image description here
I deployed an internal angular application on the server using nginx configuration. Polyfills.js, main.js, runtime.js are generated due to angular in the dist folder. ...
0
votes
0
answers
38
views
Package MIME returning wrong extension
All file images are returning jpeg. How to solve this and get the correct MIME type.
Flutter doctor - no issues
Flutter 3.7.7
pubspec.yaml
...
image_picker: ^0.8.7+5
mime: ^1.0.4
...
Future<void&...
0
votes
0
answers
65
views
How to make a file downloadable in FastAPI with supporting multiple extension types?
I am fetching contents of files from a server. The server contains all types of files like json, text, etc.
@app.get("myurl")
def get_file(myfilename):
mydata=fetch_file_from_server(...
0
votes
0
answers
104
views
Nginx - Stylesheet not loaded because of MIME type & [HTTP/1.1 404 Not Found 3ms]
Using Nginx, I'm switching over from XAMPP to Docker and now my css files that worked perfectly in XAMPP doesn't work here. The error messages I received in FireFox console is:
The stylesheet was not ...
0
votes
0
answers
40
views
Is there any way to find extension for password protected ms word, ms excel and ms power point using tika-core
using org.apache.tika:tika-core:1.24 to find the Mimetype. but for Password protected file such as word, excel and powerpoint, it returns mime type x-tika-msoffice but no exentions. It works for ...
1
vote
2
answers
518
views
MIME type of .mjs files is "text/html" when deploying React (ViteJS) app to Azure Kubernetes
I've built a React application utilizing ViteJS with TypeScript. I've built the project using tsc && vite build. I've then built the Docker image based on my Dockerfile:
FROM node:18.12.0
COPY ...