jDownloadsownloads.com


Author Topic: Show real path to pdf document  (Read 5665 times)

0 Members and 1 Guest are viewing this topic.

Offline electronic

  • Newbie
  • *
  • Posts: 6
Show real path to pdf document
« on: 22.11.2013 10:35:39 »
Hello,

is there a way to show real and full path to pdf document? Now I get http://www.webpage.com/component/jdownloads/finish/92/862, but i want to show  http://www.webpage.com/dokumentai/zurnalai/PSICHOLOGIJA/PSICHOLOGIJA%202013%2047/102-115.pdf.

Is it possible?

Regards
Arminas

Offline Arno

  • Administrator
  • ***
  • Posts: 12.290
    • jDownloads.com
Re: Show real path to pdf document
« Reply #1 on: 22.11.2013 11:01:36 »
hi,
you can deactivate the 'Send download over PHP Script' Option in configuration.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!

Offline electronic

  • Newbie
  • *
  • Posts: 6
Re: Show real path to pdf document
« Reply #2 on: 22.11.2013 11:18:04 »
Hi,

thank you for quick reply.

i still get not full pdf address. Btw I'm using jDownloads Content plugin.

Arminas

Offline Arno

  • Administrator
  • ***
  • Posts: 12.290
    • jDownloads.com
Re: Show real path to pdf document
« Reply #3 on: 22.11.2013 11:24:02 »
Okay, i must check this later today. I am not in the office.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!

Offline ettiejgva

  • Newbie
  • *
  • Posts: 1
Re: Show real path to pdf document
« Reply #4 on: 26.12.2013 19:47:57 »
Well it worked for me. I get the full pdf path when deactivating this option. Thanks!

Offline sherylmathews

  • Newbie
  • *
  • Posts: 1
Re: Show real path to pdf document
« Reply #5 on: 12.06.2014 04:49:31 »
The first is:
File f = new File (this.getClass (). GetResource ("/"). getPath ());
System.out.println (f);
Results:
C: \ Documents% 20and% 20Settings \ Administrator \ workspace \ projectName \ bin
Get the current class where the project path;
If you do not add "/"
File f = new File (this.getClass (). GetResource (""). getPath ());
System.out.println (f);
Results:
C: \ Documents% 20and% 20Settings \ Administrator \ workspace \ projectName \ bin \ com \ test
Get the absolute path of the current class;

Second:
File directory = new File ("");// parameter is empty
String courseFile = directory.getCanonicalPath ();
System.out.println (courseFile);
Results:
C: \ Documents and Settings \ Administrator \ workspace \ projectName
Get the current class where the project path;

Third:
URL xmlpath = this.getClass (). GetClassLoader (). GetResource ( "selected.txt");
System.out.println (xmlpath);
Results:
file: / C: / Documents% 20and% 20Settings/Administrator/workspace/projectName/bin/selected.txt
Get the current project src directory path to the file selected.txt

Fourth:
System.out.println (System.getProperty ( "user.dir"));
Results:
C: \ Documents and Settings \ Administrator \ workspace \ projectName
Get the current project path

Fifth:
System.out.println (System.getProperty ( "java.class.path"));
Results:
C: \ Documents and Settings \ Administrator \ workspace \ projectName \ bin
Get the current project path