mime

Is there a way to have a Codeigniter controller return an image?

Hey, I was wondering if there was a way for a controller to, instead of returning a string, or a view, return an image (be it JPG, PNG etc). For example, instead of ending with a $this->load->view('folder/special_view.php), I'd like to do something like $this->load->image('images/gorilla.png'), and have it so if my user were to go to t...

Client side (javascript/jQuery) file manipulation before/after upload/download.

I'm just sounding things out about this having looked around for a while and drawn a blank. I'd like to see if this is even possible as so far I can't see a way to do it. I want to encrypt a file locally (in the browser using existing libraries) before uploading it. Then I'll need to retrieve it and decrypt it before presenting the file...

I need to open a file based on its mime type

I have the code to get the mime type. It seems to work. When I put mimeType in an if statement, I don't get the desired effect. Here are the snippets. GET the mime type-- MimetypesFileTypeMap mimeTypesMap = new MimetypesFileTypeMap(); String mimeType = mimeTypesMap.getContentType(file); Now I want to only open a file if the mime type...

REST question: PUT one representation, GET a different one?

Short version of the question: Does "GET" at a particular URI need to match what was "PUT" to that URI? I think not. Here's why: Given that a resource is an abstract thing that is theoretically unknowable by the client, when we do a PUT, we must be only sending a representation. Based on combing over RFC2616, it doesn't seem entirely...

IE plugin (mimetype content extension) accelerators

Hi everyone, I wrote a content extension plug-in for IE (ActiveX component, c++) That control has at least one inputbox. The problem that I have is that some of the keystrokes (tab, backspace etc) are processed also by the main IE window. I would very much like to inhibit IE processing those. One more thing will be to programmaticall...

DecodeToStream in Indy10

I want to upgrade my application from Indy 9 to 10 with Delphi 2007. Now this don't compile anymore as DecodeToStream is not found. The code use Bold framwork as there is reference to BoldElement. Any alternative methods to call ? UPDATE (I think I simplify previous example too much) Original code: BlobStreamStr : String; M...

HttpClient alternative in Eclipse API

For HTTP communications in Java, I normally use the HttpClient library. However, my latest project utilizes the Eclipse API. Are there features in the API that have the same capabilities as HttpClient? As implied, this particular project requires me to use GET, PUT, and POST requests. I also need to post multipart MIMEs where the Con...

What is the importance of correct MIME types?

In my Chrome I am getting these warnings: Resource interpreted as stylesheet but transferred with MIME type text/plain. Resource interpreted as script but transferred with MIME type text/html. pngResource interpreted as image but transferred with MIME type text/plain. Why should I care? Or what is the probability that there is a brows...

How to make IIS to deliver stylesheets with the correct MIME type?

Currently my IIS is serving CSS files with no Content-Type header. How to change it? Should I change it on my application or in the server? ...

How do I register a file association in Ubuntu.

I'm in the process of creating a Ubuntu Installer and I need to register my own file extension I cant find any examples of how to do this. Could people provide me with some script snippets on how to do this? NB: Im using InstallJammer to help me create the installer, which allows me to call external scripts - so that is why a script ...

How to use the xdg-mime command

Can someone provide example on how to use (with GNOME Ubuntu) the XDG-MIME command? I'm struggling to get anything working even with the docs. For example if I want to register the extension .mfe with an application called MyApp what would the steps be? This is my attempt so far, I would appreciate any pointers on getting this right... ...

Send MIME-encoded file as e-mail in C#

Hi folks, I've got the problem that I have a MIME-encoded file with all relevant mail information (subject, from, to, ...) and want to send it over a defined SMTP server via C#. I've looked at the MailMessage class and searched for a solution, but I couldn't find something fitting. Are you able to help me? Thanks, Matthias ...

Send Email from Firefox Extension

What is the best way to send email from a Firefox extension? I can't just execute a mailto: link, because I need an attachment (actually, I really need a specific MIME-encoding, so I'd like full control of my headers). Worst-case I can speak SMTP to the user's SMTP server I guess... is there a raw socket request ability in Firefox? ...

QWebView get content type

When I click on a link in a QWebView I need to perform some actions based on the MIME type of that link. Obviously when I click on the link QWebView tries to navigate there, but how do I get the content type after this? ...

MIME type wont change for IIS6 Dynamic content

After changing .zip file mime type on IIS 6 metabase to (application/x-zip), I can see that .zip downloads with a new content type when I download it from static folder (/zip) But I use ISAPI extention to download .zip the mime type (?downloadname=filename thus dynamic content) changes it to (application/x-zip-compressed). Verified it wi...

rewriting Javascript before it's loaded by the browser

I need to arbitrarily rewrite Javscript code, client-side, before it's loaded by the browser. I would like to handle script tags as well as referenced .js files. Dynamically generated script tags are not a goal. My client is running a proprietary system, so this only needs to work with IE for now (IE6+). I've read up on MIME-filterin...

silverlight plugin is not working on server

Hello, i am using silverlight plugin 3.0 to display the chart.it is working fine on local pc but it is not working on server,it is not displaying any thing. i have checked the MIME type also in iis.its over there. please tell me whats the problem thanking you samir ...

Add mime type to HTML link

I know how to change the MIME type in a webserver. I used this to make sure the browser downloads my .scrpt file instead of opening the plain text version. So far so good but is it possible to do the same with a link? I would like to link to a file on GitHub but this will open as a plain text file. Can I add a "MIME type attribute" to th...

PHP send MIME emails...doesn't work anymore

I just switched from a shared server to a virtual dedicated. The whole site works, but my mail forms have quit sending MIME emails the way they used to. What used to appear before the server switch: hallo fwend What appears now in the emails (appears as though my client doesn't support MIME): Content-Type: multipart/alternativ...

Do all other desktop and mobile browsers support application/xhtml+xml except IE's all version till 8 and IE mobile?

Do all other desktop and mobile browsers support content served as application/xhtml+xml except IE's all version till 8 and IE mobile? ...