웹페이지에 그림 파일을 보여줄 때 해당 파일이 반드시 서버에 있어야 합니까?

NoSyu의 이미지

안녕하세요.

최근에 Python twisted server를 이용해서 웹페이지를 구축하고 있습니다.

그 중 페이지 하나는 입력을 받아 거기에 맞는 그림 파일을 만들어서 그 사람에게만 보여주는 temporary 페이지입니다.

따라서 그림 파일을 굳이 서버에 저장해야 하는가 싶고, 어차피 그림 파일을 보려면 클라이언트 컴퓨터에 다운로드 받아야 하는 것이니 HTML 전송할 때 같이 전송해서 보게 하는 방법이 없을까 고민하였습니다.

하지만 HTML에 그림 파일 내용을 첨부한다는 말은 들어본 적이 없는터라 그 외에 다른 방법이 있는지 찾아보았습니다.

비슷한 기능을 하는 latex -> gif 웹페이지를 보니 gif 파일을 자신의 서버에 저장하여 URL을 보여주는 방식입니다.

gif를 생성하는 것은 좋지만 그것의 URL을 만들 필요 없이 한 번만 불러 페이지에 보여줄 수 있는 방법이 있습니까?

개념만 생각하고 있는터라 정리가 안 되네요.

예를 들어 이렇게 생각하고 있습니다.

A 서버에서 b.gif 파일을 가지고 있는데 이것을 public_html 폴더와 같은 곳에 넣고 싶지 않습니다.

대신 C 클라이언트가 한 번 그 파일을 웹페이지에서 보고 싶다고 요청이 들어오면 서버는 b.gif를 d.html에 보이게 합니다.

하지만 한 번 보여준 b.gif는 더 이상 사용되지 않을 것이기에 삭제할 것입니다.

PHP에서 파일 다운로드 받는 방법을 보니 header에 MIME를 붙여 파일을 print하는 방법을 쓴 것을 본 적이 있어 그림 파일도 이와 비슷하지 않을까 생각하여 질문을 적게 되었습니다.

아이디어 혹은 아시는 분께 답변 부탁드립니다.

Stand Alone Complex의 이미지

MHTML을 사용하시면 될 것 같습니다.

http://ko.wikipedia.org/wiki/MHTML (한글)
http://en.wikipedia.org/wiki/MHTML (영문)

RET ;My life :P

NoSyu의 이미지

c'est un des orgueils de notre pauvre humanité, que chaque homme se croie plus malheureux qu'un autre malheureux qui pleure et qui gémit à côté de lui
- Le Comte de Monte-Cristo
-----------------------------------------------------------------------

아.. 이런 것이 있군요!

하지만 아직 지원하는 것이 많지 않다니.....

답변 고맙습니다.ㅜ

c'est un des orgueils de notre pauvre humanit?, que chaque homme se croie plus malheureux qu'un autre malheureux qui pleure et qui g?mit ? c?t? de lui
- Le Comte de Monte-Cristo
-----------------------------------------------------------------------

NoSyu의 이미지

c'est un des orgueils de notre pauvre humanité, que chaque homme se croie plus malheureux qu'un autre malheureux qui pleure et qui gémit à côté de lui
- Le Comte de Monte-Cristo
-----------------------------------------------------------------------

또 다른 방법이 있습니다.

http://en.wikipedia.org/wiki/Data_URI_scheme

c'est un des orgueils de notre pauvre humanit?, que chaque homme se croie plus malheureux qu'un autre malheureux qui pleure et qui g?mit ? c?t? de lui
- Le Comte de Monte-Cristo
-----------------------------------------------------------------------

bookgekgom의 이미지

한국여러 사이트들이 늘 그래왔듯이 플레쉬를 쓰면 됩니다.

으하하하하핳

ps. 하지마세요.-_)
---------------------------------------------------------------------------------------------------------------
루비 온 레일즈로 만들고 있는 홈페이지 입니다.

http://jihwankim.co.nr

여러 프로그램 소스들이 있습니다.

필요하신분은 받아가세요.

---------------------------------------------------------------------------------------------------------------
루비 온 레일즈로 만들고 있는 홈페이지 입니다.

http://jihwankim.co.nr

여러 프로그램 소스들이 있습니다.

필요하신분은 받아가세요.

NoSyu의 이미지

c'est un des orgueils de notre pauvre humanité, que chaque homme se croie plus malheureux qu'un autre malheureux qui pleure et qui gémit à côté de lui
- Le Comte de Monte-Cristo
-----------------------------------------------------------------------

플래쉬라...

이론상 가능한가요?

라고 생각해보니 플래쉬에 대해서 아는 것이 전혀 없네요.;;;;OTL...

c'est un des orgueils de notre pauvre humanit?, que chaque homme se croie plus malheureux qu'un autre malheureux qui pleure et qui g?mit ? c?t? de lui
- Le Comte de Monte-Cristo
-----------------------------------------------------------------------

bookgekgom의 이미지

플렉스죠.

칸바스에 다른 서버에서 그림을 로딩하여 보여줄수있습니다.

그런데 이렇게 .swf 를 남발하면 사이트가 둔해짐 ㅋ
---------------------------------------------------------------------------------------------------------------
루비 온 레일즈로 만들고 있는 홈페이지 입니다.

http://jihwankim.co.nr

여러 프로그램 소스들이 있습니다.

필요하신분은 받아가세요.

---------------------------------------------------------------------------------------------------------------
루비 온 레일즈로 만들고 있는 홈페이지 입니다.

http://jihwankim.co.nr

여러 프로그램 소스들이 있습니다.

필요하신분은 받아가세요.

academic의 이미지

이 것도 역시 다른 서버에는 이미지 파일이 존재해야 가능한 것 아닌가요?

--
academic은 제 고등학교 때 동아리 이름입니다.
academic, 아주 가끔은 저도 이랬으면 좋겠습니다.

----
academic은 제 고등학교 때 동아리 이름입니다.
academic, 아주 가끔은 저도 이랬으면 좋겠습니다.

kyagrd의 이미지

답글 달아 놓고 보니 제가 글을 잘못 읽었네요 자삭합니다. -_-;;
--
There's nothing so practical as a good theory. - Kurt Lewin
"하스켈로 배우는 프로그래밍" http://pl.pusan.ac.kr/~haskell/

--
There's nothing so practical as a good theory. - Kurt Lewin
"하스켈로 배우는 프로그래밍" http://pl.pusan.ac.kr/~haskell/

cjh의 이미지

http://en.wikipedia.org/wiki/Data_URI_scheme

이걸 보시면 되겠네요.

--
익스펙토 페트로눔

--
익스펙토 페트로눔

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.