2 Replies Latest reply on Sep 8, 2016 11:44 PM by VoTiNH4o8

    Beginner:  files upload


      Hi All,


      i am a beginner


      i have a question, so if userA upload a file to make it available to everyone to view, where would that file residE or live?  does it upload directly into our webserver and then pull it back again using url?


      please advice



        • 1. Re: Beginner:  files upload
          VectorP Level 4

          Where the file is stored, is usually not interesting for the app. It just needs to know which web service has to receive the data, and which web service will provide the link to the files.


          See it this way:

          a. the app will post the file data to a web service, a server side script somewhere. It will need to know the url of the script.

          b. the web service will store the file data somewhere. The app doesn#T need to know where. The script was programmed to put it on the own server's file system, or to have the dbms store it in a database, or perhaps even use another (external) api to get it stored on Google or some other Cloud.

          c. if the app wants to retrieve such file as file data, it needs to call a request to a web service, which returns the file data. Only the web service script will have to know how to do that (get from a Cloud storage, from the database or the own file system). If the app needs to display a list of files, it will make a request to a web service which returns a list of urls (to be displayed in the app). If the user taps such link, the file is retrieved,


          So, the app and the back end are coupled losely: the app doesn't need to know where the files are stored, and the back end doesn't need to know how they are presented by the cients.

          • 2. Re: Beginner:  files upload
            VoTiNH4o8 Level 1

            Thank you Victor!


            I was once a web developer but no longer in the field for the last 10yrs and just got back to App recently.  I was hoping to start out with PhoneGap or Cordova for a quick app.


            So app are the front end just like a website is displaying all the GUI, then the back end we have database and web server to store all files...


            Thanks for the break down Victor!