Questions tagged [mime]

0

votes
0

answer
10

Views

Unable to attach a excel file which created from pandas dataframe in email from python

I am reading an file from amazon S3 and then doing some data manulipations in pandas and then sending an automoated email . The filename is always is going renamin the same . I am trying to convert the dataframemodelput to xls file and attach it in the email How to fix this My code import os import...
Rahul rajan
1

votes
1

answer
104

Views

What mime type should be used for squashfs files?

In my API, I need to provide a file/directory resource (call it a thing) in different formats including a tar.gz and as a squashfs file. I have been looking at the 'official' mime types and it looks like application/x-compressed-tar is appropriate for a thing.tar.gz file. But what about if thing is...
Randy
1

votes
0

answer
294

Views

content-transfer-encoding standards for text/plain attachments

If I create multipart/mixed MIME message do I need to use Content-Transfer-Encoding: base64 for any Content-Type: text/plain attachment? Or any text/plain can be set as Content-Transfer-Encoding: quoted-printable as well and going be delivered as a proper attachment?
JackTheKnife
1

votes
0

answer
368

Views

how to add mime type to data url

How can I add mime type to data url, for example Ex: data:image/jpeg,http://google.com/images/abc.jpg In fact I have the images url to which I am appending data:image/jpeg otherwise am only able to download the image as abc.txt (server defaulting to text) on anchor/link click using download attrib...
js6yaml
1

votes
1

answer
723

Views

Wildfly Undertow File Mimetypes

I want Undertow to serve static files like .jpg, .png, .js, .css, .txt etc... I edited the undertow subsystem in standalone.xml: I hav some files in my '/resource' folder '1.jpg', '2.png', 'js.js', 'c.css' in: http://localhost:8080/resource/1.jpg --> shows nothing in browser http://localhost:8080/...
sh hjr
1

votes
0

answer
30

Views

Find error in mime email formatting

I'm sending an html-formatted email with a link like this: click here It works fine in most email clients, but for a very small percentage of recipients, they receive a modified link that either removes the '.' before 'com' or adds a second '.' before the com. Like one of these: click here click he...
gaefan
1

votes
1

answer
479

Views

Symfony Base64_encode on pdf in response

I want to base64_encode a pdf file before returning it to the client. Here is what I do $response = $event->getResponse(); $response->headers->remove('Content-Disposition'); $response->setContent( $response->headers->get('Content-Type') . ';base64,' . base64_encode($response->getContent()) ); $respo...
Hakim
1

votes
0

answer
138

Views

Preview PDF report from SSRS on browser

I have an SSRS report hosted on Server. I can get the PDF version of the report from this URL. http://sql-01/ReportServer/Pages/ReportViewer.aspx?%2fReports%2fQuotes_Invoices%2fClientInvoicePrint&InvoiceParameter=2&rs:Format=PDF But SSRS sets the content-disposition to attachment rather than inline...
Yesudass Moses
1

votes
0

answer
49

Views

what is MIME type of xit64 type file?

I tried to download xit64 type file through java application, but unable to download as no mime type avilable for this type. I tried APPLICATION/OCTET-STREAM mime type but still it is not working!
Pankaj Sinhasthe
1

votes
0

answer
85

Views

Add custom MIME to APACHE Tika?

I am trying to add a custom mime type to Apache Tika. I have the following: I am getting an error about a Conflicting extension pattern .st: Caused by: org.apache.tika.mime.MimeTypeException: Conflicting extension pattern: .st at org.apache.tika.mime.MimeTypesReader.startElement(MimeTypesReader.java...
user9446871
1

votes
0

answer
29

Views

How to change default endline in Python email.mime

When I am using the mime module, I would like to change the default end line (which is \n) from email.mime.text import MIMEText a = MIMEText('hello') a['From'] = 'stack' print(a.as_bytes()) The result is b'Content-Type: text/plain; charset='us-ascii'\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7...
Eric Stdlib
1

votes
0

answer
88

Views

Failed to send an MIME email body with mail command?

I write a silly Python script to build a multipart/mixed MIME email body and try to send this email body with mail command. The recipient got the mail, but just treats it as a plain text body and displays its source code. I want to know how I can make my MIME email body to be recognized by my recipi...
Neal.Marlin
1

votes
0

answer
43

Views

Replacing MIME type of a file

I have a device that I want to play a video file from with an HTML5 video player, The device code it untouchable. The developers of the device has made a mistake and are sending the wrong MIME type for a video, They send video/mpeg Instead of the standart video/mp4 This mistake prevents the browser...
Yossi Neiman
1

votes
0

answer
107

Views

loading assets infinitely on a nginx for nodejs application whose resources are compiled with webpack

I try to put a nodejs application in production using a nginx server when I test locally everything works fine but when I put on line I have an infinite load of some particular assets here is my nodejs configuration file upstream beauteadom_me { server localhost:3000; } server { listen 80; listen [:...
wamba kevin
1

votes
0

answer
26

Views

Bootstrap based spring application not working offline

I downloaded a bootstrap template from internet. And I added that template to my spring application. It's working fine with internet, but my application not loading offline. I added MIME tags in my web.xml eot application/vnd.ms-fontobject otf application/x-font-opentype ttf application/x-font...
Santosh Patnana
1

votes
0

answer
19

Views

Determine the Mimetype of an image in JavaScript?

Given the URL of an image—on a domain which I control—how can I determine the mimetype of that image via client-side JavaScript? There is no reliably available file extension as part of the URL. I would strongly prefer to not have to build a server-side solution if possible (e.g., upload the im...
Chris W.
1

votes
1

answer
221

Views

What is the proper way to pass multiple variables to MIMEText

I am trying to pass some variables to MIMEText then send those variables as a body in a plain text email. Seems simple enough but no matter what I try I don't get the expected result. Here is what I have: import cgi from datetime import datetime import smtplib from email.mime.text import MIMEText...
djabe
1

votes
1

answer
530

Views

Determine base64 uploaded file extension and mime type

I have a FileField Serializer for uploaded base64 audio, I noticed that the Base64 string does not start with data:****. How do I determine the Mime Type of the uploaded file? i_need_the_file_extension_mimetype() class AudioField(serializers.FileField): def to_internal_value(self, data): if isinstan...
Paullo
1

votes
1

answer
216

Views

Automatic acceptance of the invitation to the meeting icalendar

Tell me please about the possibility of implementing an automatic acceptance of an invitation to an event in Outloock. The task is for the participant of the event to receive a reminder of the type 'Meeting' on the mail, which would be displayed in his calendar (Outlook mail client). In this case, t...
R.Evgeny
1

votes
1

answer
531

Views

How can I get the file extension from the mimetype in iOS using Swift

As the title says, I've got a file downloaded from a server and I know the mimetype of it, but how can I work out what file extension should be used for it when writing to storage?
Matt Lacey
1

votes
0

answer
249

Views

WOFF and WOFF2 mime type support for express js

I am using express static middle ware to serve my static file to server, facing 404 error for woff2 and woff fonts. This two mime type are available in development environment, but not in production environment. I have hosted my node js app in Azure. I tried following lines in web.config in Azure se...
Kunalan Krish
1

votes
1

answer
1.2k

Views

multipart file upload check mime type in java

I am using mimeutil for checking the mimetype of a file. And only allowing csv and json files. But getting this mimetype for a json file 'application/x-ipynb+json' mime type which is nowhere found. Any help will be appreciated to get the exact mime type of a file if also renamed a exe file to json w...
codenow
1

votes
0

answer
64

Views

Check if Chromecast can play video file

Our customers can upload videos to our servers, when they download our Android application they can play the videos amongst other features. One of them other features is being able to cast these videos to chromecast devices. When they tap to play a video our server sends over a url similar to: https...
1

votes
1

answer
1.4k

Views

Refused to apply style because MIME type is not supported

I keep getting an error that says that the MIME type ('text/html') isn't executable or not a supported stylesheet MIME type and that strict MIME checking is enabled. Error shown My code that links it is, This is how the template is supposed to look Template However, this is what it looks like Templa...
Natalie
1

votes
0

answer
12

Views

PEAR Mail_Mime overwrite header “To”

currently I'm working on a plugin for Roundcube using some functions of Mail_Mime. At one point I have to replace the recipient of the mail with another one, so I use $message->get(); $message->headers(array('To'=>implode(',', $recipients)), true); This code is doing well. But there still is the 'En...
DDehning
1

votes
1

answer
51

Views

Why does do I get a 404 when trying to post content from a zip file vs a normal text file?

I have an MVC cross Web API app that has an ApiFileController, headed: [Produces('application/json')] [Route('api/File')] public class ApiFileController : ApiBaseController It has the following action method [HttpPost('PostDir')] [DisableRequestSizeLimit] public async Task PostDir(string serverPath)...
ProfK
1

votes
0

answer
170

Views

Consuming multipart MIME object from SOAP message in WCF C#

I have been having a lot of trouble getting this going in c# and googling has not worked out as i had hoped. The problem is i am receiving this MTOM signal as a Stream object. It has 2 parts. The XML and a byte[] that is a ZIP file which i need to save to disk. Does anyone know a good way to do this...
Mootinator
1

votes
0

answer
270

Views

Mime type for all kind of image formats

Is there any specific type of mimetype for images , which accecpts all sort of images not videos if so please help me here i have to differenciate images and videos while uploading so am testing like this if(req.body.type == 'img' || req.file.mimetype != 'image/jpeg'){ // }else if(req.body.type ==...
Manasa
1

votes
0

answer
129

Views

Browsersync: Refused to execute script from 'XX/app.js' because its MIME type ('text/html') is not executable, etc

The issue only pops up when using Browsersync thus far, the script is called with I call Browsersync with: var browserSync = require('browser-sync').create(); browserSync.init({ server: './dist', }); and the script being called is empty with a simple bit of code with a basic function that logs a st...
David McKissick
1

votes
1

answer
228

Views

HTML change mime type for download using chrome extension

My extension creates 2 anchor links to download 2 files from a server. An mp4 video file and an m4a audio file. The server has changed the Content-Type in the header of the m4a audio file from 'audio/m4a' to 'audio/mp4' When you click on the download link for the m4a audio file, it saves it as '.mp4...
Ta946
1

votes
0

answer
61

Views

Which MIME Types can be displayed in browser

I'm writing an internal application to serve up files to consuming applications, and I'm trying to figure out which file types can be displayed in browser. As an Example: A .docx file cannot be displayed in browser (by default at least). If an attempt is made to display it, it would begin downloadi...
Memedon
1

votes
0

answer
134

Views

How to get Sub-type MIME of an Office document, instead of getting OOXML in Tika

I am using Tika to validate filetypes and make sure no one is trying to send a malicious or fake file under the guise of a genuine one. To do this I am using Apache Tika. However, even if I wrap the InputStream into a TikaInputStream, or using OOXMLParser or OfficeParser, it still returns applicatio...
takuter
1

votes
0

answer
225

Views

Firefox transforming text/css to text/plain (NGINX server)

I'm mounting a server with nginx, and I have some issue with my css. On IE it's well displayed, but the firefox's console says me that my css files were not loaded because their mime type is text/plain and not text/css. In my server, I've got this into the 'mime.types' file : text/css css; I have in...
Jean Dupont
1

votes
1

answer
97

Views

MIME-Email Images appear as tappable boxes on iphone

Ok, so I have an HTML email with several inline images (charts and such). The images are embedded using CID. The email works perfectly fine on all desktop platforms. My issue is that the images are no longer inline when you try to open the email on iPhone (IOS mail app or IOS Outlook). This is what...
1

votes
0

answer
58

Views

Select files on Android web with input type=file: excel files incorrectly available to select, and return PDF mime type

I want to limit file uploads on my mobile web app to image and PDF file types. However, when I open the file picker in Chrome on Android, I can select excel files, which should not be available to select based on what I've specified in the accept attribute of the input element. The problem seems to...
vincenttsao14
1

votes
0

answer
26

Views

How can I use this api? Keep getting error with mime type…(naver smart editor error)

$(function(){ nhn.husky.EZCreator.createInIFrame({ oAppRef : oEditors, elPlaceholder : 'contents', sSkinURL : '../../Api/se2/SmartEditor2Skin.html', fCreator : 'createSEditor2', }) }) This is my code. This is my first time using api and getting error with using Naver's smart editor API. I'm using c...
정성진
1

votes
1

answer
115

Views

How to check MimeMessage for attachments in JUnit or Mockito?

I have a Spring web app that sends generated PDF files via email using MimeMessage and JavaMail and I want to create test cases using JUnit and Mockito to check if the attachments exists. Is it possible to test this? And if so, whats the best approach?
dropdownthrowaway
1

votes
0

answer
68

Views

Email attachments named “body” in Outlook but not in Gmail

I have a very strange behaviour in Outlook (web, for Windows or for Mac) when I receive a mail with an attachment. The email is sent by a backend (Microsoft BizTalk) and Mime properties are set accordingly to set the file name of the attachment. When the email is received in Outlook for Windows, the...
David GROSPELIER
1

votes
0

answer
240

Views

Refused to execute script from 'https://googleads.g.doubleclick.net/pagead/mraid.js' because its MIME type ('text/html')

I get these error types in google chrome for adsense ads. 'Refused to execute script from 'https://googleads.g.doubleclick.net/pagead/mraid.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.' At the same time our adsense ctr dropped very significant...
Christoph Eilers
1

votes
1

answer
108

Views

How to write a magic file for libmagic to detect srt (subtitle) files

hhvm use libmagic to detect mime types of files. When i upload a subtitle file in srt format with the keyword 'extern' as first word of a line hhvm (libmagic) detect it as text/x-c and the validation in symfony dont except the file. That's why I need a magic file for libmagic to correctly recognize...
micha

View additional questions