Đã Hủy

[PHP] Fixing API to use CloudFront using AWS S3

I am currently uploading photos to AWS s3 bucket and that S3 URL is being saved in the database as shown picture below:

[url removed, login to view]

Now I just created a Cloudfront Distribution since I believe its will boost the speed of retreving images.

However, not since a Cloudfront URL is automatically generated for any object that is uploaded to my bucket, the S3 URL needs to be replaced with the Cloudfront URL when serving the images, And how to do that?

I want to do either option 1:

Like i think it can be done either by creating another column in db for the generated Cloudfront URL and pulling that, still i dont know how to do it?

or option 2: Replace the s3 URL in the obtained URL with cloudfront URL when are pulling it from database.

So what best think to do to make it work?, I need help to switch to CloudFront but still my data stored in S3 bucket OR substitute for the CloudFront URL using a string replacement function (easy, but hard-coded).

Or Whatever easier for you..

Gist of S3 uploading code:

[url removed, login to view]

Kỹ năng: Dịch vụ trang web Amazon, PHP, Kiến trúc phần mềm

Xem thêm: create aws bucket php, fix api broker, currenex demo fix api, dukascopy fix api metatrader, google fix api, fix api saxo bank, fix api projects, forex fix api, currenex fix api platform, saxo bank fix api, stn fix api, currenex fix api, fxcm fix api, fix api saxobank

Về Bên Thuê:
( 71 nhận xét ) Kuwait, Kuwait

Mã Dự Án: #14864480

5 freelancer đang chào giá trung bình $36 cho công việc này

ownmyserver

Hi, Thanks for giving me this opportunity to give you proposal for your requirement. I have reviewed your requirement and i find this quite interesting, i would like to work on this project. Relevant Skills and Experi Thêm

$55 USD trong 1 ngày
(133 Đánh Giá)
6.0
$44 USD trong 1 ngày
(5 Đánh Giá)
6.0
$25 USD trong 1 ngày
(0 Đánh Giá)
0.0
sgulati216

Have already done it on many websites Can fix it for you.. We are using cloudfront URL instead of S3 URL. you can also use signed URL for security purposes. At your service Sahil

$30 USD trong 1 ngày
(0 Đánh Giá)
0.0
teknosoft5

Dear Prospect Hiring Manager. Thank you for giving me a chance to bid on your project. I am a serious bidder here and i have already worked on a similar project before and can deliver as u have mentioned I have c Thêm

$28 USD trong 6 ngày
(0 Đánh Giá)
0.0