Member-only story
Upload Image to PHP Server in Ionic 3
When using mobile applications there are moments that you might have come across to upload files or images to a server, For an example if you are developing a product using image processing you need to upload images to the backend and run those images through the model that you developed to process the image and get an output.
In ionic uploading an image to a server is not as easy as it seems, when uploading an image to a server image is sent as a 64byte stream and the server should be capable of taking that byte stream and converting it to an image again. So to upload an image to Ionic first we need to create an ionic mobile app
ionic start appname
when you create a new project it will ask about using the ionic4 beta version you can put ‘no’ and can select a template. Here we are using a blank template.
if you want to use the new native plugins that were made for the ionic4 beta version we can update the ionic using package.json
file and add new features to the project. but if you update the ionic version in the file you need to update all the native plugins in the ionic project. to update the ionic version you need to find and update the following dependency like this,
@ionic-native/core: ^5.0.0-beta.21