473,411 Members | 2,059 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,411 software developers and data experts.

how to transparently get an image to the server?

Is there any way to transparently get an image file from the client machine
to the server? I already have a way to transparently generate the file and
query for the file name (all done on the client side), but there doesn't
seem to be any way to send it to the server after that. For files that are
just text, I am able to write their contents to a hidden field, but I can't
do that with an image.

Thanks,

Jim
Nov 17 '05 #1
4 1253
Would you want web sites to be able to transparently upload files from your
hard drive?
Neither would I.
That's why it's not permitted.

If you really need to do this, you'll need to get the user's permission by
having them accept the use of a thick-client component such as an ActiveX
control or a windows forms control.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com


"Jim Hammond" <jh******@postalinnovations.com> wrote in message
news:u7**************@TK2MSFTNGP10.phx.gbl...
Is there any way to transparently get an image file from the client machine to the server? I already have a way to transparently generate the file and
query for the file name (all done on the client side), but there doesn't
seem to be any way to send it to the server after that. For files that are
just text, I am able to write their contents to a hidden field, but I can't do that with an image.

Thanks,

Jim

Nov 17 '05 #2
Thanks, this app runs in a controlled environment, and I already have a .NET
assembly embedded in the page to capture the image from the client's video
camera.

I am currently looking at several possibilities, but it looks like I may
have add a web service to my server, and the client-side assembly could then
send the image to the server using the web service.

I access the functions of the client-side component using a JavaScript
function. Perhaps if I could convert my JavaScript function to C#, then a
component function could return a System.Drawing.Image or a byte[]. I don't
know how I would get either type to the server, but I haven't succeeded in
converting my JavaScript function to C# anyway.

Jim
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:ub**************@TK2MSFTNGP11.phx.gbl...
Would you want web sites to be able to transparently upload files from your
hard drive?
Neither would I.
That's why it's not permitted.

If you really need to do this, you'll need to get the user's permission by
having them accept the use of a thick-client component such as an ActiveX
control or a windows forms control.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com


"Jim Hammond" <jh******@postalinnovations.com> wrote in message
news:u7**************@TK2MSFTNGP10.phx.gbl...
Is there any way to transparently get an image file from the client machine to the server? I already have a way to transparently generate the file and
query for the file name (all done on the client side), but there doesn't
seem to be any way to send it to the server after that. For files that are
just text, I am able to write their contents to a hidden field, but I can't do that with an image.

Thanks,

Jim


Nov 17 '05 #3
Yes, it sounds like you're using a good approach.
I think it's a good idea to use C# on the client to accomplish this. A web
service could be useful in conjuntion with this, or you could potentially
use remoting.
I created a similar application using remoting that sends an image across
the network using a stream.
Here's some of the VB.NET code I used:

Dim ms As New System.IO.MemoryStream()
MyImage.Save(ms, Drawing.Imaging.ImageFormat.Jpeg)

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Jim Hammond" <jh******@postalinnovations.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Thanks, this app runs in a controlled environment, and I already have a ..NET assembly embedded in the page to capture the image from the client's video
camera.

I am currently looking at several possibilities, but it looks like I may
have add a web service to my server, and the client-side assembly could then send the image to the server using the web service.

I access the functions of the client-side component using a JavaScript
function. Perhaps if I could convert my JavaScript function to C#, then a
component function could return a System.Drawing.Image or a byte[]. I don't know how I would get either type to the server, but I haven't succeeded in
converting my JavaScript function to C# anyway.

Jim
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:ub**************@TK2MSFTNGP11.phx.gbl...
Would you want web sites to be able to transparently upload files from your hard drive?
Neither would I.
That's why it's not permitted.

If you really need to do this, you'll need to get the user's permission by
having them accept the use of a thick-client component such as an ActiveX
control or a windows forms control.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com


"Jim Hammond" <jh******@postalinnovations.com> wrote in message
news:u7**************@TK2MSFTNGP10.phx.gbl...
Is there any way to transparently get an image file from the client

machine
to the server? I already have a way to transparently generate the file and query for the file name (all done on the client side), but there doesn't
seem to be any way to send it to the server after that. For files that are just text, I am able to write their contents to a hidden field, but I

can't
do that with an image.

Thanks,

Jim


Nov 17 '05 #4
Adding a web service to my ASP.NET application and having the client-side
assembly send the image (as a byte[]) to a web service method was easy to
implement and seems to be working well.

Jim
Nov 17 '05 #5

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

Similar topics

3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
23
by: Erik Schulp | last post by:
Hi all, I am using a background image via a stylsheet. I've used this code: background-image:url("/images/tile.gif"); (which I think is correct) The image doesn't show up however, the path,...
4
by: zborisau | last post by:
Hey good people, I've been given a problem to solve recently - and stuck with the solution for a good 4 days already. i have a link which leads to popup window. the purpose of that popup...
0
by: Jim Hammond | last post by:
I have a client-side component that captures an image and saves it in a file on the client system's hard drive. Although I can return text data from the component and transparently get that text...
1
by: John Thompson | last post by:
We're sooo close. When we load the page to upload the image, all of the prms go through except the binary image data. Using SQL server with the data type set to "image". Please help! Thanks-...
35
by: Stan Sainte-Rose | last post by:
Hi, What is the better way to save image into a database ? Just save the path into a field or save the image itself ? I have 20 000 images (~ 10/12 Ko per image ) to save. Stan
13
by: Daniel Crespo | last post by:
Hi to all, I want to print a PDF right from my python app transparently. With "transparently" I mean that no matter what program handles the print petition, the user shouldn't be noticed about...
3
by: Thomas Satzinger | last post by:
Hallo., i just encounterd a strange thing which i cannot resolve. I am saving a bitmap created in memory to the asp temp folder (asp.net 2.0) this works fine, and i donīt want to create an...
3
by: premprakashbhati | last post by:
hi, good evening.. i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button() here is the code ...its work fine...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.