IntimateFriend Posted May 19, 2015 Share Posted May 19, 2015 HTML/PHP question. Hi, I'm writing a project, where I must store some files on external cloud. To get files and show them to user I must send curl GET request. The respond from server (which lasts approximately 1-2 sec. for 1Mb file) is file content (get_file_contents), which I echo out and place a link to the source attribute of img tag,<img src="image.php?file=img.jpg"><img src="image.php?file=img2.jpg"><img src="image.php?file=img3.jpg"> etc.The problem is when on one page there are many image files, requests to cloud are executed one by one (not asynchronously). How to resolve it in the most effective way? Quote Link to comment Share on other sites More sharing options...
requinix Posted May 20, 2015 Share Posted May 20, 2015 Resolve what? You've described what it is doing, uploading one file at a time, but not why that is a problem. Quote Link to comment Share on other sites More sharing options...
IntimateFriend Posted May 20, 2015 Author Share Posted May 20, 2015 Resolve what? You've described what it is doing, uploading one file at a time, but not why that is a problem. I need to do it asynchronously. So people do not wait until each image is uploaded. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.