Change the IP from localhost to server IP address


When I click on the download button 127.0.0.1:1337/parse/files/myappID/93bc6b6559d4ebedf8c9dd1f11c92566_image.png link opens up. And on accessing it in my program ConnectException is given. How can I change this localhost address to the following address
http://3.129.72.123/parse/files/myappID/93bc6b6559d4ebedf8c9dd1f11c92566_image.png

ParseQuery<ParseObject> query = ParseQuery.getQuery("Image");
    query.whereEqualTo("username", username);
    query.orderByDescending("createdAt");
    query.findInBackground(new FindCallback<ParseObject>() {
        @Override
        public void done(List<ParseObject> objects, ParseException e) {
            if (e == null && objects.size() > 0){
                for (ParseObject object : objects){
                    ParseFile file = (ParseFile) object.get("image");
                    file.getDataInBackground(new GetDataCallback() {
                        @Override
                        public void done(byte[] data, ParseException e) {
                            if(e == null) {//Error occurs here
                                if (data != null) {
                                    Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length);
                                    ImageView imageView = new ImageView(getApplicationContext());

                                    imageView.setLayoutParams(new ViewGroup.LayoutParams(
                                            ViewGroup.LayoutParams.MATCH_PARENT,
                                            ViewGroup.LayoutParams.WRAP_CONTENT
                                    ));

                                    imageView.setImageBitmap(bitmap);
                                    linearLayout.addView(imageView);
                                } else {
                                    Log.e("Image Error", "Couldn't fetch image properly");
                                }
                            }else{
                                Log.e("ParseException","Wrong IP address found");
                                e.printStackTrace();
                            }
                        }
                    });
                }
            }else{
                Log.e("PArse Exception||Object", "Object size may be less than 0");
                e.printStackTrace();
            }

        }
    });

change serverURL to http://3.129.72.123/parse

1 Like

I don’t think any changes is required here.
putty

I dont know bitnami but you can try to change host.

change host with??
Any specific value? And also I don’t have permission to change any value or add any new configuration.

Is there no one to help me on this topic. Thank you @uzaysan, although you know less about parse server but you have tried to help. It has been 3 days since I am stuck on this problem.

You should probably ask help at bitnami since the problems you are facing are related to the way they deploy Parse Server.

1 Like

Ok… Thank you @davimacedo