Loading...

Upload Image To Web Server Android, PHP, MYSQL PART 1/2

Upload Image To Web Server Android, PHP, MYSQL PART 1/2
In this tutorial we learn how to encode image using the android platform. Then, the picture is sent to the server and decoded. After that, it is saved on the web-server. Path to the image is also saved in the database.

Github: https://github.com/miskoajkula/PHP-MYSQL-IMAGE-UPLOAD

☑ Visit fb page: 
https://www.facebook.com/androidTuorialsAndNews

RRelated Posts

11 Cool Websites Everyone Should Know!

Did you know about all these cool websites? More Top Lists ▶ https://www.youtube.com/playlist?list=PLFr3c472Vstw-sCvBrlRTelW3ULg1-w3n Subscribe Here ▶

CComments

  • Preeti Gupta
    where is github code for this
  • Padre Loco
    Hello Sir! Thank you for your tutorial! Any guides this time with the server in Spring Boot (JPA)??
  • sourabh wasnik
    I love you sir.
  • Lili susanti
    What is the site for the $ post test
  • Channel Berantakan
    request on linux
  • Channel Berantakan
    like it.. subcribe me. develovers
  • pisey sen
    Could you show me , if we use codeigniter?
  • Mohan Krishna V
    can you pls teach a way where we can upload upload images to db tables rather than folders.Thanks
  • Vtube Gallery
    can you tell me ,chat back up like a whatsapp. need options:- backup to google drive,account, include video... cane you tell me the source code?
  • GNK Afridi
    error occur:
    The server encountered an internal error and was
    unable to complete your request. Either the server is
    overloaded or there was an error in a CGI script.
  • imran shaikh
    sir please give me Builder editor link
  • Sowmya Sivaraj
    Hi Sir,

    Am getting the below error,while running the php script in postman.Anyone please help.It is quite urgent ..

    >HTTP Error 414. The request URL is too long
  • Bruno Walle
    Hello Filip !
    First, I'd like to thank you for your great work ! You are really helpfull ! You make things accessible.

    Unfortunately I can't access the image.
    I tried to implement what you explaned in this video in my project and I always got an error.

    E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /storage/emulated/0/Pictures/testing123.jpg: open failed: EACCES (Permission denied)

    which causes a fatal error :

    Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.Bitmap.compress(android.graphics.Bitmap$CompressFormat, int, java.io.OutputStream)' on a null object reference

    I don't know why I have this error since I added this permission android.permission.WRITE_EXTERNAL_STORAGE in the manifest.

    I then tried to import your poject directyl and got the same error... I searched on the internet but the only answer I got was to add this permission that I already added so .... I don't know what to do anymore.

    Do you have any idea (I am trying to run it on a samsung galaxy S5 with android 6.0) ?


    Thank you again for all your tutorials ! I love them !
  • Shivam Rawat
    i m geting 0 value for name and path ......can u tell me what could be the possible reason??
  • Joewew
    the php doesnt work! how i supposed to do?
  • Abbas Khan
    you bastard English bilta hai
  • Sivakumar P
    It uploads only sometimes , sometimes it does not - what could be wrong?, Does is retry few times & then drop? Is it because it tries only once that it fails the upload at times?
  • roslyn jovez
    FILIP!! I LOVE YOU! YOU ARE MY HERO ;-*
  • MaxPower 3
    For anyone getting an error in postman about the path, you can go to the public html and create a folder called images
  • عبدالله قاسم
    Hello Mr. How to upload multiple photo in this php script
  • Marwansyah NST
    i like your tutorial man (y)..i will support your youtube revenue
    thanks
  • Shravan Jain
    Hi Filip,

    Thanks for this video. I got all of the points which you have explained here. Same i have implemented but i got an error.

    fopen(upload/sharvan.jpg): failed to open stream: Permission denied in
    <b>/Applications/XAMPP/xamppfiles/htdocs/api/upload_image_to_server.php

    Can you please help me to fix this error.
  • Harjot Bhatia
    I'm getting transparent images no matter what I do.
    Please Help
  • priyanka gangurde
    i am trying to insert record but its not working properly so help me.....
  • Freddie Mukendi
    Hi guys I managed to get this working but on my live server I get no response and nothing is uploaded. So I tried using postman to post to my live server and that works. please anyone have some advise on what I should do thank you.
  • jog39
    Thanks Filip! It worked great! much simpler than other tutorials
  • Jonatans Souza
    Hi Thanks for the video,
    How would I retrieve the images uploaded to the server?
  • Sukma Arbianto
    Alhamdulillah, thanks for the tutorial!
  • Aklesh singh
    i love you channel...keep making tutorials..........
  • Aleksandr Namanyuk
    What application you use in the end of your video to check PHP script ? There is no name, can't find it :) help please :)
  • Robin Khan
    This is a nice video tutorial. Can you help me out to upload audio or video file
  • Ishan Fernando
    How to upload video ?
  • José Nobre
    Hello, thanks for the video? Can you tell me How can you give atribute to photos ( for example rating Star our include them in categories)?
  • Denis Belfort
    Byte64 it is something new for me! Thanks!
  • Luciano Santos
    Tks for your excellent video!
    I get invalid image when I try to open the image uploaded.
    I checked the image size in kbytes and it is ok.
    Do you have any idea how I solve this problem?

    Thank you!
  • vignesh kalai
    [
    {
    "title": "Dawn of the Planet of the Apes",
    "image": "http://abcabc.in/json/movies/1.jpg",
    "rating": 8.3,
    "releaseYear": 2014,
    "genre": ["Action", "Drama", "Sci-Fi"]
    },
    ....
    ....
    ]

    help me how to create such kind of json array and using them in android