Welcome, Guest
Username: Password: Remember me

TOPIC: [SOLVED] Upload File directories

[SOLVED] Upload File directories 10 May 2012 10:05 #2298

Hi Cook,

Could you please look in my account at the component called DocumentLibrary?

I created the component in cook that utilises the File Upload.

I have created this component so that admins can upload PDF files and administer them.
Then to send out email messages with a link to the various individual PDF files - so that the recipients can click on the link and download the PDF file(s).

My problem is that when they receive the email and click on the link to download the PDF file - they get a 'Forbidden' error:

"Forbidden

You don't have permission to access /DocumentLibrary/customerservicesstatement.pdf on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

I have altered the saving path in the component within Joomla and checked that the folder had read/write access but everytime I test it - the permissions change automatically.

Question:
Is there something in my component that makes the folder/link "Forbidden" when presented in the form of a link.
When I test it allows me to download the file once, but thereafter I get the forbidden message everytime.

Please help?

kind regards, Terry (8churchpath).
The administrator has disabled public write access.

Re: File Upload ... link error in component 10 May 2012 11:51 #2301

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
if it is A DIRECT LINK :
Check the CHMODS of your directory automatically created by your component at the first upload.


if you use UNDIRECT LINKS (much better) :

On the preview of the image (fly, or grid), set up a link with 'download' action. So you get your undirect link.

When you have this :
Is your link calling administrator/index.php ?
Because generated urls in backend are called through backend controller, wich is not public.

If you remove 'administrator' in the url, it should works perfectly.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: File Upload ... link error in component 10 May 2012 13:07 #2302

Thanks Admin.

If I have:

[COM_SITE]/files/

as the storage folder for my files.

Should the link I can give out to people be: www.mysite/files/nameof-file.pdf

??

many thanks,
Terry.
The administrator has disabled public write access.

Re: File Upload ... link error in component 10 May 2012 13:18 #2303

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
No.

Here are the list of the Patterns possibilities :

Coding is now a piece of cake
The administrator has disabled public write access.

Re: File Upload ... link error in component 10 May 2012 13:38 #2304

Thank you so much Admin - I've got it working now.

:woohoo:

Terry.
The administrator has disabled public write access.

Re: [SOLVED] Upload File directories 20 Jul 2012 14:19 #2834

  • santicano
  • santicano's Avatar
  • Offline
  • New Member
  • Posts: 1
  • Karma: 0
Same problem here with images , I need to access the images uploaded but with a direct link.

every single time I upload a Photo , the directory CHMOD permisions is reset to 644 so I can`t access the files.

Any other solution?? I need to access directly??
The administrator has disabled public write access.

Re: [SOLVED] Upload File directories 28 Aug 2012 21:09 #3337

  • dyvel
  • dyvel's Avatar
  • Offline
  • Elite Member
  • Posts: 200
  • Thank you received: 11
  • Karma: 10
Same problem for me...

My solution was to call the image (in my case) in a different way... I was using this for a CSS background image
background-image: url(./index.php?option=com_releaseplan&task=file&path=[DIR_GAME_BACKGROUND_IMAGE]' . $this->gameitem->background_image . ')!important;
Last Edit: 28 Aug 2012 22:05 by dyvel.
The administrator has disabled public write access.

Re: [SOLVED] Upload File directories 29 Aug 2012 13:35 #3339

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Of course it is a security. Chmods as well.

If you want to access the files directly, you must change the Chmod settings in the classe file. (classes/upload.php)

EDIT : It is a constant in the top of the class, you can redifine as you want.
//TODO
@define("DEMO120_UPLOAD_CHMOD_FOLDER", 0744);
@define("DEMO120_UPLOAD_CHMOD_FILE", 0644);
Coding is now a piece of cake
Last Edit: 29 Aug 2012 13:37 by admin.
The administrator has disabled public write access.
The following user(s) said Thank You: dyvel
Time to create page: 0.135 seconds

Get Started