User view (aka Upload page)

Phoca Download - download manager
yiotaz
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 24 May 2020, 17:42

User view (aka Upload page)

Post by yiotaz » 24 May 2020, 17:49

Hello,

I have customized the user view as I needed my registered users to be able to upload their files individually. I have created a common category for the component to work, I have preselected the category id in the upload page and my question is the following:

How can I make the file title linkable so the uploaded file can be downloaded by the user that performed that action, since he properly sees what is uploaded in this page in the list above the form and can delete it without having to visit the category page.

So long story short, I want the user that uploaded a file to be able to download it via the user view page, regardless if there is a category page available or not (in their case it will not, only the admins will see the category page).

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 42627
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: User view (aka Upload page)

Post by Jan » 27 May 2020, 21:34

Hi, there is no such option, but if you have customized the view, you can add there download button for such file. Just see category or file view for the method which just displays the button to download and copy this form to the user view :idea:

Jan
If you find Phoca extensions useful, please support the project

yiotaz
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 24 May 2020, 17:42

Re: User view (aka Upload page)

Post by yiotaz » 28 May 2020, 08:24

If the user hasn't access to the category page though, this will not work, right?
The link is something like this: ... /category-url-alias?download=file_id:filename ...

Is there maybe a way for each user to view his files under this category page?

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 42627
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: User view (aka Upload page)

Post by Jan » 28 May 2020, 14:41

Hi, yes, if the user just does not have rights to download the files (if category or file rights or if menu link rights, etc.) then he/she is not able to download them. :idea:

The download is not about the view, the download is for every view the same - it is just managed by download rights.

Jan
If you find Phoca extensions useful, please support the project

yiotaz
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 24 May 2020, 17:42

Re: User view (aka Upload page)

Post by yiotaz » 31 May 2020, 10:14

Ok I have found a solution which works pretty good for my case.

Now I see that the Delete file via the upload file form is not working and I get no errors. I have set the rights in the category for all registered users to delete files but after the dialog appears and I press OK, nothing happens. Any ideas of what should I look for for this to work?

yiotaz
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 24 May 2020, 17:42

Re: User view (aka Upload page)

Post by yiotaz » 31 May 2020, 13:51

Also, another question, how can I prevent one user to download files of another user? For example, if user A has file A and file B and user B gets somehow the download link, like ..../category?download=A:file-alias he should not be able to download it. Now, it does.

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 42627
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: User view (aka Upload page)

Post by Jan » 31 May 2020, 20:29

Hi, download it checked for the rights, so if the users does not have rights to download the file, the link just says that he/she must login to download the file.

Jan
If you find Phoca extensions useful, please support the project

yiotaz
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 24 May 2020, 17:42

Re: User view (aka Upload page)

Post by yiotaz » 01 Jun 2020, 07:55

I have tried this out and if I mingle with the link and add another id in the download, like this, if I change by hand the 4 to 2, where 2 is definitely another users file, I can still download it.
For the upload to work I do have the rights to All registered users. Now I need to work on a better setup for the Download maybe but there are no other options more than All registered users, Nobody and specific so I don't know how this could work...
Any more info you could give me from setting up the permissions in the category or anything else you can think of, I could really appreciate it.
Last edited by christine on 01 Jun 2020, 22:40, edited 1 time in total.
Reason: Link deleted.

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 42627
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: User view (aka Upload page)

Post by Jan » 01 Jun 2020, 15:31

Hi, does the file with ID 2 set the rights in category or file:

File (can be set for group):
Image

Category (can be set for group extended for users):
Image

It does not matter who created the file, or where it is located, but important is (when we talk about access rights), which access rights are set for the file or its category.

Jan
If you find Phoca extensions useful, please support the project

yiotaz
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 24 May 2020, 17:42

Re: User view (aka Upload page)

Post by yiotaz » 01 Jun 2020, 15:54

In my case then where I want each user to be able to access only his uploaded files, what is the best setup I can to do in your opinion?

Post Reply