Hi,
I have 2 hostings one is in USA and the second is in the my country.
So, is there any way to do uploading users pictures from the 1st
server to secound without using FTP? Maybe upload control can do this?
bye 5 1106
maybe create a web service on the server with web method...someth ing
like this?:
[WebMethod(Descr iption = "Check Image Upload")]
public bool CheckImageUploa d(byte[] byteImage,
out string ErrorInfo)
{
ImageUpload iu = new ImageUpload();
.....
.....
....
if (!iu.SaveImageT oFile(byteImage , out ErrorInfo))
{
return false;
}
ErrorInfo = "";
return true;
}
catch (Exception ex)
{
ErrorInfo = ex.Message;
return true;
}
}
....
....
public bool SaveImageToFile (byte [] byteImage,
out string ErrorInfo)
{
try
{
string ImageFileFullPa th = <path to
image>;
System.IO.Memor yStream ms =
new System.IO.Memor yStream(byteIma ge);
System.Drawing. Bitmap bitmap =
(System.Drawing .Bitmap)System. Drawing.Image.F romStream(ms);
bitmap.Save(Ima geFileFullPath,
System.Drawing. Imaging.ImageFo rmat.Png);
ErrorInfo = "";
return true;
}
catch (Exception ex_save_image)
{
ErrorInfo = ex_save_image.M essage;
return false;
}
}
....
....
On 4 Lut, 16:44, siccolo <aleks...@hotma il.comwrote:
maybe create a web service on the server with web method...someth ing
like this?:
[WebMethod(Descr iption = "Check Image Upload")]
public bool CheckImageUploa d(byte[] byteImage,
out string ErrorInfo)
{
ImageUpload iu = new ImageUpload();
....
....
...
if (!iu.SaveImageT oFile(byteImage , out ErrorInfo))
{
return false;
}
ErrorInfo = "";
return true;
}
catch (Exception ex)
{
ErrorInfo = ex.Message;
return true;
}
}
...
...
public bool SaveImageToFile (byte [] byteImage,
out string ErrorInfo)
{
try
{
string ImageFileFullPa th = <path to
image>;
System.IO.Memor yStream ms =
new System.IO.Memor yStream(byteIma ge);
System.Drawing. Bitmap bitmap =
(System.Drawing .Bitmap)System. Drawing.Image.F romStream(ms);
bitmap.Save(Ima geFileFullPath,
System.Drawing. Imaging.ImageFo rmat.Png);
ErrorInfo = "";
return true;
}
catch (Exception ex_save_image)
{
ErrorInfo = ex_save_image.M essage;
return false;
}
}
...
...
oh, thats a good idee :)
On 4 Lut, 16:44, siccolo <aleks...@hotma il.comwrote:
maybe create a web service on the server with web method...someth ing
like this?:
[WebMethod(Descr iption = "Check Image Upload")]
public bool CheckImageUploa d(byte[] byteImage,
out string ErrorInfo)
{
ImageUpload iu = new ImageUpload();
....
....
...
if (!iu.SaveImageT oFile(byteImage , out ErrorInfo))
{
return false;
}
ErrorInfo = "";
return true;
}
catch (Exception ex)
{
ErrorInfo = ex.Message;
return true;
}
}
...
...
public bool SaveImageToFile (byte [] byteImage,
out string ErrorInfo)
{
try
{
string ImageFileFullPa th = <path to
image>;
System.IO.Memor yStream ms =
new System.IO.Memor yStream(byteIma ge);
System.Drawing. Bitmap bitmap =
(System.Drawing .Bitmap)System. Drawing.Image.F romStream(ms);
bitmap.Save(Ima geFileFullPath,
System.Drawing. Imaging.ImageFo rmat.Png);
ErrorInfo = "";
return true;
}
catch (Exception ex_save_image)
{
ErrorInfo = ex_save_image.M essage;
return false;
}
}
...
...
btw, what is faster? web service or file transfare [ftp] ?
On Feb 4, 4:43*pm, "lazi...@gmail. com" <lazi...@gmail. comwrote:
On 4 Lut, 16:44,siccolo<a leks...@hotmail .comwrote:
maybe create a web service on the server with web method...someth ing
like this?:
[WebMethod(Descr iption = "Check Image Upload")]
* * public bool CheckImageUploa d(byte[] byteImage,
* * * * * * * * * * * * * * * * out string ErrorInfo)
* * {
* * * * ImageUpload iu = new ImageUpload();
....
....
...
* * * * * * if (!iu.SaveImageT oFile(byteImage , out ErrorInfo))
* * * * * * {
* * * * * * * * return false;
* * * * * * }
* * * * * * ErrorInfo = "";
* * * * * * return true;
* * * * }
* * * * catch (Exception ex)
* * * * {
* * * * * * ErrorInfo = ex.Message;
* * * * * *return true;
* * * * }
* * }
...
...
public bool SaveImageToFile (byte [] byteImage,
* * * * * * * * * * * * * * * * out string ErrorInfo)
* * {
* * * * try
* * * * {
* * * * * * string ImageFileFullPa th = <path to
image>;
* * * * * * System.IO.Memor yStream ms =
* * * * * * * * * * new System.IO.Memor yStream(byteIma ge);
* * * * * * System.Drawing. Bitmap bitmap =
(System.Drawing .Bitmap)System. Drawing.Image.F romStream(ms);
* * * * * * bitmap.Save(Ima geFileFullPath,
System.Drawing. Imaging.ImageFo rmat.Png);
* * * * * * ErrorInfo = "";
* * * * * * return true;
* * * * }
* * * * catch (Exception ex_save_image)
* * * * {
* * * * * * ErrorInfo = ex_save_image.M essage;
* * * * * * return false;
* * * * }
* * }
...
...
btw, what is faster? web service or file transfare [ftp] ?- Hide quoted text -
- Show quoted text -
SOAP/HTTP versus FTP? in general FTP is faster...but... FTP is more
efficient for large(er) files, and HTTP is for smaller...but FTP and
HTTP based on the same TCP/IP...but, it all depends on the bandwith,
servers, application etc etc..my 3cents:)
SOAP/HTTP versus FTP? in general FTP is faster...but... FTP is more
efficient for large(er) files, and HTTP is for smaller...but FTP and
HTTP based on the same TCP/IP...but, it all depends on the bandwith,
servers, application etc etc..my 3cents:)
ok :) thx for answare
bye 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: David Lozzi |
last post by:
Howdy,
I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders!
Now I am making a public function that will take the path of the uploaded image, and resize it with the provided dimensions. My function is below. The current function is returning an error when run from the upload function: A generic error occurred in GDI+. Not sure what exactly that means. From what...
|
by: SEMIH DEMIR |
last post by:
Sitelerden birinde verilen yabancı kaynakli bir scriptti duzenledim
yanlız birseyin içinden bir turlu cıkamadım işin aslı ilk defa
persistin upload componentini kullanacam yanlız suanki haliyle
verdiği hata şu.Bilen arkadaşlar lütfen yardım edin
Persits.Upload.1 error '800a0020'
The system cannot find the path specified.
/classifieds/upload.asp, line 250
|
by: Wayne Smith |
last post by:
I've come up against a major headache that I can't seem to find a solution
for but I'm sure there must be a workaround and I would really be grateful
of any help.
I'm currently building a web site for a small club I belong to and one of
the features I would like to include is the ability to allow users to upload
image files.
unfortunately the servers web root www folder only allows READ and EXECUTE
permissions, which makes it...
|
by: SammyBar |
last post by:
Hi all,
I wonder is it possible to upload the content of an <imgfield to a server.
The content of the <imgwas downloaded from a web site different from the
one it should be uploaded. The image file should not be saved locally before
uploading. It should not be visible any <input type=file on the form.
How can it be done?
I'm working on a project where client javascript requests an image server to
generate dynamic images. The client...
| |
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: 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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
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.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |