beefcake2233

Registered
Oct 7, 2018
3
0
1
Florica
cPanel Access Level
Website Owner
The goal I have is to have cPanel allow for an android app to access images from cPanel for use in the app. Issue is that whenever I add sometime to file manager I can never get a link to show on another computer, I even tried the public html folder.

I do not need anything fancy or complicated, I just need the ability for my android app source code to access images in cPanel via a basic JSON. I started with cloudinary website and it was successful but I was limited regarding bandwidth so I purchased a domain and hosting with go daddy.
 

beefcake2233

Registered
Oct 7, 2018
3
0
1
Florica
cPanel Access Level
Website Owner
Hi @beefcake2233
What did you mean when you said that you cannot get a link of image?
can you navigate to the link through a browser (outside of your app)? While the file permission is 0644 you can get and access it from anywhere.

So I am in my cpanel, and I have placed some samples images in the public_html folder for view, but when I go to example.com/imagefolder/image.jpg nothing shows up.

Am I missing something that is SQL or PHP related? Goal is to be able to call on images from an android app via json. I have everything else working besides being able to get photos out of this website / cpanel.
 
Last edited by a moderator:

Shood

Well-Known Member
Aug 12, 2015
74
14
83
Middle East
cPanel Access Level
Root Administrator
Am I missing something that is SQL or PHP related?
I think no, while everything else working correctly with the image link, maybe your json cannot make a connection with your website?

Try some other ways to catch the error, e.g.
1- change the link in Json to another image link on another website
2- or try to use {try, catch} in your json to know if there's an error, something like that:
This is of course out of cPanel at all
Code:
try { HttpURLConnection connection = (HttpURLConnection) imageURL
         .openConnection();
         connection.connect();
            // your script
        } catch (IOException e) {
            e.printStackTrace();   }
3- or try to change your mobile IP or navigate through a VPN to the image link through your mobile browser to ensure that it can get connected to your website.
 
  • Like
Reactions: beefcake2233

beefcake2233

Registered
Oct 7, 2018
3
0
1
Florica
cPanel Access Level
Website Owner
I think no, while everything else working correctly with the image link, maybe your json cannot make a connection with your website?

Try some other ways to catch the error, e.g.
1- change the link in Json to another image link on another website
2- or try to use {try, catch} in your json to know if there's an error, something like that:
This is of course out of cPanel at all
Code:
try { HttpURLConnection connection = (HttpURLConnection) imageURL
         .openConnection();
         connection.connect();
            // your script
        } catch (IOException e) {
            e.printStackTrace();   }
3- or try to change your mobile IP or navigate through a VPN to the image link through your mobile browser to ensure that it can get connected to your website.

I can open a private browser window and am not able to see anything I post in the root / public_html and the code is 0644.

Can I PM you anything on this because I have to be missing something minor.
 

Infopro

Well-Known Member
May 20, 2003
17,113
507
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Can I PM you anything on this because I have to be missing something minor.
You should never send details of your account to anyone you don't know. As your account lists you as a Website Owner, I suggest you contact your Hosting Provider, instead, and ask them to check your files and directories permissions.
 
  • Like
Reactions: Shood

Shood

Well-Known Member
Aug 12, 2015
74
14
83
Middle East
cPanel Access Level
Root Administrator
Hi @beefcake2233, I confirm what @Infopro said.
As in everything else, also in programming we have first to analyse the problem before finding the solution.

The expected reason for your issue (for my mind) is one or more of these:
1- Something in your website cPanel
2- Wrong script/s in your json
3- The capability of your mobile to connect to your website

If you try the three steps that I've suggested before (do one step only for each try), or contact your host provider as Infopro said so, you can catch the reason.

Try some other ways to catch the error, e.g.
1- change the link in Json to another image link on another website
2- or try to use {try, catch} in your json to know if there's an error, something like that:
3- or try to change your mobile IP or navigate through a VPN to the image link through your mobile browser to ensure that it can get connected to your website.

I hope to help you
Good luck
 
Last edited by a moderator: