Name: bluemix-php-objectstorage-uploader
Owner: IBM jStart
Description: A simple PHP application for demonstrating how to upload and delete files from Object Storage.
Created: 2016-04-13 18:01:50.0
Updated: 2017-01-16 15:17:38.0
Pushed: 2017-01-16 21:34:18.0
Size: 185
Language: PHP
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A simple PHP application for demonstrating how to upload and delete files from Object Storage.
We highly recommend using the Deploy to Bluemix button for any users unfamiliar with deploying applications on Bluemix.
Once you click on the button above, you will be taken to a page to sign into your Bluemix account so you can deploy your app. Once your app is live, your page should look like this:
Go ahead and click on “View your app”, and enjoy!
Before we begin, we first need to install the Bluemix Command Line Tool as well as the CF Command Line Tool that will be used to upload and manage your application. If you've previously installed an older version of the cf tool, make sure you are now using cf v6 by passing it the -v flag:
cf -v
In the terminal, go to the directory of your app and follow these steps:
Clone the repo
clone https://github.com/ibmjstart/bluemix-php-objectstorage-uploader
luemix-php-objectstorage-uploader
Modify “host” in manifest.yml to a unique sequence, like this:
: <your-unique-username>-bluemix-php-objectstorage-uploader
Create the Object Storage service
reate-service Object-Storage Free Uploader_Object-Storage
Push app
ush
You should get a response similar to that shown below:
requested state: started
instances: 1/1
usage: 128M x 1 instances
urls: <your-unique-username>-bluemix-php-objectstorage-uploader.mybluemix.net
last uploaded: Mon Jan 16 21:23:52 UTC 2017
stack: cflinuxfs2
buildpack: https://github.com/cloudfoundry/php-buildpack
state since cpu memory disk details
#0 running 2017-01-16 04:25:52 PM 0.0% 1.1M of 128M 1.3M of 1G
Now in order to view your app, copy and paste what comes after the “urls: " tag above into your browser! Enjoy!
If you need help setting up the Cloudfoundry CLI please refer to the Bluemix docs
Your app should look like this once deployed:
You can upload files to store in Object Storage as demonstrated above.
This sample is provided under the MIT license