rayman0487 Posted July 20, 2013 Share Posted July 20, 2013 Hey all! I have a web app that uses cURL to connect to a PHP API. Everything is working fine, but now I need to be able to download a file. My users are able to upload files to the API and they are saved on the server, but now I'm trying to download those files. If i navigate directly to api.php?file=somefile.pdf the API will output the file in the headers and I get the open to save or open the file as expected. Now, what I'm trying to do is get my client application to save the file, but I have no idea what to even Google. Everything I've tried is more about sending files to an API (uploading). So if anyone knows any good resources or how to do this please let me know. Sorry for any shortcomings in this post, but I type it out quickly, as I'm working on multiple things today and this is just one of those and is causing a huge headache. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/280348-downloading-a-file-from-an-api/ Share on other sites More sharing options...
Solution rayman0487 Posted July 20, 2013 Author Solution Share Posted July 20, 2013 Please disregard this topic. I fiddled around with cURL and got it working. If anyone knows how to delete or edit post, please let me know and I will do so. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/280348-downloading-a-file-from-an-api/#findComment-1441510 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.