image

image

am 07.01.2008 15:32:44 von jaems

On one of my sites (php based) users can upload photos.
as they are uploaded the details of the filenames are stored into my SQL
database


I have another site (using asp.net) on to which I want the photos to be
copied as they appear in the database

What I need is someting like:

filecopy("http:www.site1.co.uk/pictures/xyz.jpg", "~/imagepath/xyz.jpg)

Can anyone help with the syntax please

jaez

RE: image

am 07.01.2008 18:29:00 von pbromberg

Take a look at the WebClient class. It has a handy DownloadData method that
returns a byte array that you can save to the filesystem with the image name
and extension.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com


"jaems" wrote:

> On one of my sites (php based) users can upload photos.
> as they are uploaded the details of the filenames are stored into my SQL
> database
>
>
> I have another site (using asp.net) on to which I want the photos to be
> copied as they appear in the database
>
> What I need is someting like:
>
> filecopy("http:www.site1.co.uk/pictures/xyz.jpg", "~/imagepath/xyz.jpg)
>
> Can anyone help with the syntax please
>
> jaez
>
>

Re: image

am 07.01.2008 19:42:40 von jaems

Just what I needed - thanks

"Peter Bromberg [C# MVP]" wrote in message
news:328F969F-EE9C-48D3-AFD2-43CB3AE7765F@microsoft.com...
> Take a look at the WebClient class. It has a handy DownloadData method
> that
> returns a byte array that you can save to the filesystem with the image
> name
> and extension.
> -- Peter
> Site: http://www.eggheadcafe.com
> UnBlog: http://petesbloggerama.blogspot.com
> MetaFinder: http://www.blogmetafinder.com
>
>
> "jaems" wrote:
>
>> On one of my sites (php based) users can upload photos.
>> as they are uploaded the details of the filenames are stored into my SQL
>> database
>>
>>
>> I have another site (using asp.net) on to which I want the photos to be
>> copied as they appear in the database
>>
>> What I need is someting like:
>>
>> filecopy("http:www.site1.co.uk/pictures/xyz.jpg", "~/imagepath/xyz.jpg)
>>
>> Can anyone help with the syntax please
>>
>> jaez
>>
>>