Hello,

I am trying to place pdf link in CI: http://www.gsa-constructionspecialist.com/articles/article/detail/tugas-lpjk-ke-5

I wonder why I cannot link it. I already place the file address name, yet it comes back to the original file when I click it.

Try another file which I copy exactly from the cpanel: http://www.gsa-constructionspecialist.com/articles/article/detail/visi-dan-misi-training-names-gsa

It has that strange file it carries me to the cpanel which requires a password. That's not a good idea for the visitors.

Any idea how to fix this problem?

Sorry, I'm not quite understanding your question. I clicked the two links you provided and I'm not attending up at cPanel?

Can you open the pdf file? That's my intention. I cannot open the file link. I am using CI.

I do not know how to write the file link.

I cannot put the url into link to open it. I have to type it in the url.

Hi,

the first link redirects with 302 to the home page, when instead should show a 404 error page.

Look here:

And go to the first folder:

You server is listing the index, from there you can see that the upload directory does not exists. It exists uploaded, from there you can get the file. Fix the link and it should work fine.

The second link you posted points to cpanel because it referes to a cpanel session, it cannot download a file without having a valid session. That's for security, so it is correct.

The thing is I am trying to gives this whole file for visitors. I do not want any security for it.

Could you show the code used to build these links?

Oh, ok, there is a configuration option FILES_ROOT in the conf.json file of the Roxyfileman, used to define the path in which upload the files. According to the documentation the path MUST be absolute to the document root of the website:

Looking at the HTML of the first link you posted, it does not seem to be absolute:

<div style="text-align:justify"><p><a title="Presentasi Tugas LPJK ke 5" href="../../../../assets/upload/artikel/2007TugasLPJKke5.pdf" target="_blank" rel="noopener noreferrer">Presentasi: Tugas LPJK ke 5</a></p></div>

Here the value assigned to FILES_ROOT should probably be /assets/uploaded/ or /assets/uploaded/artikel/ if you want to restrict it to that path.

Are you able to browse to the PDF through the plugin? Can you upload? Like in their demo?

I try that by changing the link but it does not carry me anywhere only to www.gsa-constructionspecialist.com

That could be something else, like the rewriting rules of the server. Did you verified if the link appears different in the HTML source code?

And:

Are you able to browse to the PDF through the plugin? Can you upload? Like in their demo?

For the link I have to type it so that it does not appears strange like if I copy paste. I have to type it according to the folder.

Also, for ALL the security permission I use : Use Default through Firefox browser.

I also wonder if I could upload pdf through Roxy Filemanager?

I also wonder if I could upload pdf through Roxy Filemanager?

It seems possible. This is defined by the ALLOWED_UPLOADS and FORBIDDEN_UPLOADS of the conf.json file (see previous link). The former is the whitelist, define for example pdf jpg png to allow these files to be uploaded. The latter is a blacklist, which his own defaults, make sure pdf is not listed there and it should work fine.

Then use insert link, browse to file and select Add file to upload a file from your computer.

Once is uploaded, if you can select the file, like in their demo, then there should not be the need to type, as you can add a description text in the modal view.

I have to type it according to the folder.

That's the point, it's not upload but uploader. In any case you can insert an HTML link, but use an absolute path:

<a href="/assets/uploaded/artikel/file.pdf">[PDF] Description of file</a>

I do not see any "pdf" in FORBIDDEN_UPLOADS and just add "pdf" in ALLOWED_UPLOADS. and still do not change anything. I still cannot upload pdf file.

Check the PHP error log, it can be a permission issue.

Where to check the php error log in cpanel?

There is no error message appearing.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.