5099 Posts in 1519 Topics by 1116 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 858 Views |
-
Saving External Images

21 May 2011 at 11:45am
Hi Guys,
I'm wondering about a bit of functionality whereby a user types in an external URL of an image and silverstripe will retrieve this image, put it in a folder like /assets/sites/{domain} and create a record for it in the database.
Any help would be awesome.
Thanks.
-
Re: Saving External Images

23 May 2011 at 10:48pm
hi
I think I would put the relevant code into the onBeforeWrite() function of the dataobject where you ask for the image url.
I just googeled for getting images with php, check this: http://www.edmondscommerce.co.uk/php/php-save-images-using-curl/
And this link should be also usefull: http://silverstripe.org/data-model-questions/show/12823daniel
| 858 Views | ||
|
Page:
1
|
Go to Top |

