Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

image html format

Posted on 2005-04-04
3
Medium Priority
?
161 Views
Last Modified: 2010-04-09
I am trying to use html to display some images from a database.  I have the advice to use something like this:

 def send_image(channel, img, format='gif'):
  channel.write('HTTP/1.0 200 OK\r\n')
  channel.write('Content-Type: image/%s\r\n' % format)
  channel.write('Content-Length: %d\r\n' % len(img))
  channel.write('\r\n')
  channel.write(img)

I wonder what the format string is for a jpeg.  Is it jpg or jpeg?
0
Comment
Question by:astar666
2 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 14770850
image/jpeg
0
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
ID: 14801675
PAQed with points (250) refunded

DarthMod
Community Support Moderator
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Find out what you should include to make the best professional email signature for your organization.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question