This topic is locked

Upload Images to CDN

3/6/2018 12:56:34 AM
ASPRunner.NET General questions
C
ccvvccc author

I would like to upload my images to a CDN, not to local server.
How can I achieve this?
Can we use asprunner.net fileupload to a CDN (Content delivery network) ? Especially for images.
We can select "Absolute Path" on FileUpload, can we enter a url path here?
Does anyone use CDN with asprunner.net?
Thanks.

admin 3/7/2018

Sure, you can do that. In AfterAdd/AfterEdit event you need to use an API that your CDN service provides to move image file from the server to CDN, get a new image URL and update record with this URL. The actual code depends on what kind of CDN do you use. They all provide an API and code examples.

C
ccvvccc author 3/10/2018



Sure, you can do that. In AfterAdd/AfterEdit event you need to use an API that your CDN service provides to move image file from the server to CDN, get a new image URL and update record with this URL. The actual code depends on what kind of CDN do you use. They all provide an API and code examples.


Hi admin, thanks for your reply. I will try it. But as far as I made a research with some CDN providers, they all require a special c# library. I dont know how can I import that library in AfterrAdd/AfterEdit event. Do you know any CDN API that works without a library? Thanks.