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 4 1275
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******@posta linnovations.co m> wrote in message
news:u7******** ******@TK2MSFTN GP10.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
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.ne t> wrote in message
news:ub******** ******@TK2MSFTN GP11.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******@posta linnovations.co m> wrote in message
news:u7******** ******@TK2MSFTN GP10.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
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.Memor yStream()
MyImage.Save(ms , Drawing.Imaging .ImageFormat.Jp eg)
--
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******@posta linnovations.co m> wrote in message
news:%2******** ********@tk2msf tngp13.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.ne t> wrote in message news:ub******** ******@TK2MSFTN GP11.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******@posta linnovations.co m> wrote in message news:u7******** ******@TK2MSFTN GP10.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
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 table in MySQL with the path & filename to
the image.
I have successfully uploaded and performed an update query on the database,
but the problem I have is I cannot retain the primary key field in a
variable which is then used in a SQL update...
|
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, the filename etc etc,
everything checks out ok.
|
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
window is to redirect user to the one of available servers.
so i need to check which server is available. i have decided to
download some 1pixel image from every server and if it was downloaded
|
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 into a server-side object using a
hidden field, I don't know how to transparently get an image into a
server-side object.
Thanks,
Jim
|
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-
John
| |
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
|
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 it.
For example, when I want to print a PDF, Adobe Acrobat fires and keep
opened. This is what I don't want to happen (and I thing there are a
lot of people who want this too). So I just want to send the PDF to the
right handler and print it....
|
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 extra folder in my
application, so i don´t need my people giving that folder the asp
permissions.
Ok, my JPG is in the temp folder.
|
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 when iam using a normal web page... but can't in content page....
Code in Master Page
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="submaster.master.cs" Inherits="submaster" %>
<%@ Register Assembly="AjaxControlToolkit"...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |