473,326 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Return image from webservice

Hi,

I have database with picture locations, for example: c:\temp\test.jpg.
How can webservice return picture link?
<img width=200 height=150 src='file://c:\\temp\\test.jpg' />

<img width=200 height=150 src='c:\\temp\\test.jpg' />

It works only if the link is:

<img width=200 height=150 src=http://images/test.jpg' />


Nov 8 '07 #1
2 7528
return strLocalPath.Replace( "file://c:\\temp\\", "http://images/" );

"zion" <zi***@msn.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Hi,

I have database with picture locations, for example: c:\temp\test.jpg.
How can webservice return picture link?
<img width=200 height=150 src='file://c:\\temp\\test.jpg' />

<img width=200 height=150 src='c:\\temp\\test.jpg' />

It works only if the link is:

<img width=200 height=150 src=http://images/test.jpg' />




Nov 8 '07 #2
On Nov 8, 4:08 am, "zion" <zi...@msn.comwrote:
Hi,

I have database with picture locations, for example: c:\temp\test.jpg.
How can webservice return picture link?
<img width=200 height=150 src='file://c:\\temp\\test.jpg' />

<img width=200 height=150 src='c:\\temp\\test.jpg' />

It works only if the link is:

<img width=200 height=150 src=http://images/test.jpg'/>
Hi, the image on server can be seen on client (browser) if that
image's located in a virtual directory. For example, you have an image
in "c:\wwwpub\images\test.jpg" and the folder "c:\wwwpub\images"
mapped to virtual directory "/pub/". So this image can be request at
url "http://host/pub/test.jpg"
In your case, you have two ways to solve :
1. Change image localtion in your database to some folder mapped to
virtual directory
2. Store image content instead path. In this way, you just return
image content (as binary stream) with some http header to tell browser
know that image.

Nov 13 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John Scott | last post by:
I am storing an image in an SQL database and have one field as an image datatype. I am also using a webservice to transport data. I want to be able to resize the image and pass back a thumbnail...
0
by: Geert | last post by:
Hi all, I have a webservice that creates an image. I want to show the result of that image on my website. The website and webservice are on different servers. There is a VPN line between both...
9
by: MSDNAndi | last post by:
Hi, I have a set of simple webservices calls that worked fine using .NET Framework 1.0. I am calling a Java/Apache based webservices, the calling side is not able to supply a proper WSDL. ...
2
by: Nicolas | last post by:
Hello! I have a question: I have a database in MySql that has two fields (code and image). Now, I want to create a WebService that takes the image of the most current row (the code is the date...
4
by: Nicolas | last post by:
Hello! I have a question: I have a database in MySql that has two fields (code and image). Now, I want to create a WebService that takes the image of the most current row (the code is the date...
5
by: MattC | last post by:
Hi, I have a webservice that returns a byte for an image. I'd like to disaplay an image while the webservice is being contacted and then once the byte is available show that and remove the...
3
by: zion | last post by:
Hello, How can I return image link with webservice that I could see it in web page? The image is on my hard disk and <img src="c:\pictures\test.jpg" /does not work. If I use <img src=http://My...
4
by: Jonathan | last post by:
I have a SQL stored procedure for adding a new record in a transactions table. It also has two return values: CounterID and IDKey. I want to create a webservice that accepts the 10 input...
2
by: ksheerasagar17 | last post by:
Hello All, Scenario: Sending an image through webservice as byte array to an Java webservice. The Problem1: The webservice method image property expects (data type) SByte rather than Byte...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.