Android Example Select,Upload,Display,Delete image from Server

Discussion in 'Tutorials & Examples' started by MohammadNew, Dec 19, 2017.

  1. MohammadNew

    MohammadNew Active Member Licensed User

    Hello everyone,

    First of all, I want thank Erel, DonManfred and KMatle because a lot of the codes for them.

    In this example (Select an image from gallery and display it, Resize the image, Save the image from Imageview to app's folder, Upload the image to the server, Display the image from the server, Delete the image from the server and last choice Delete all images from the server.

    ## Note:

    You should upload php files directly in your website not in sub folder.
    Create folder "uploads" together in same place.
    Change "xxxx" from the url to your url.

    [​IMG]



    I update the app > get images as list in ListView and click on it to display the image.

    [​IMG]


    I hope this example help you.
     

    Attached Files:

    Last edited: Dec 19, 2017
    mondiq, peacemaker, sz4t4n and 11 others like this.
  2. Alexander Stolte

    Alexander Stolte Well-Known Member Licensed User

    It could be an alternative to firebase storage, depends on how much Firebase wants to end up having money when the app is out, thanks for it!
     
  3. MohammadNew

    MohammadNew Active Member Licensed User

    You're welcome
     
  4. KMatle

    KMatle Expert Licensed User

    Why? For security reasons you should store any data in subfolders which are protected with a pw. Another reason is to organize the pics (like you don't store everythin on your desktop :) ). Anyway: Nice example
     
    KZero likes this.
  5. MohammadNew

    MohammadNew Active Member Licensed User

    Hello KMatle, good point the security. But I mean the new users to do it step by step and we can put php files everywhere then refer the place in our link.

    Thanks KMatle
     
    wistong likes this.
  6. tsteward

    tsteward Active Member Licensed User

    There seems to be a problem with the php file "Multipartpost.php" $file_handle is never given a value and Null causes issues.
    I don't know how to resolve this

     
  7. DonManfred

    DonManfred Expert Licensed User

    he copied parts of an old php script of mine (See Multipart fileupload link in my Signature). The lines where the logfile is generated are missing. Due to this $file_handle is not set...
    Remove/comment the lines or add a
    PHP:
    $file_handle fopen('./logs/mylogfile_'.date("Y-W"time()).'.log''a+');
    somewhere at the beginning.
     
    tsteward likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice