Sharing Files with Specific Members

Hi All,
Apart of my website requires me to collect files from specific members for me to assess and in turn, return documented feedback (through video and PDF) to that member without any other member seeing it for privacy reasons.

I have been able to collect documents from specific users by creating a form and a custom members page but am now stuck on sharing specific files back to specific members and having these files listed and available to download.

Could anyone please lend a hand? Thanks

If those items that the user has uploaded has their userID linked to their items that they have uploaded, then you can simply have a repeater or a table that shows the users upload and as those uploads have the specific members userID attached to them, then it should be only that member who can see the uploads.

You can do something like in this tutorial from Nayeli (Code Queen)

Thanks for the response. I have watched the video and I am not quite seeing the connection yet. I am still very much a beginner and so this is quite a number of steps ahead of my knowledge.

I guess my questions should be more along the lines of:

  1. How do I upload my own files (the feedback) to the website / database?
  2. How do I isolate those files to one member?
  3. How will I be able to display these files to that one member?


I forgot to mention that you can do this without the use of code by doing it like this.

Hi GOS - unfortunately I do not believe we are on the same page on what I am seeking. As it appears to me - you are talking about logged in members viewing files uploaded by themselves, however this is not what I am in need of.

I wish for myself as the Owner to upload my own files (the feedback of the member submissions) and have only the member the feedback relates to, to see the file. No other member can see it. Just like a teacher would when returning feedback for a student assignment.

All you have to do is create an administration page and add a form with 2 entries:
1- to insert the file. (Upload button)
2- to add the name of the person who should receive the file or their email. (Text input)
And connect it with a collection

Then, in the profile page or a normal page, add a download button, connect it to the same collection (to download the file that you uploaded before), but you will need to add a filter to download only the file with the name or email of the current user.

if you need more help i can make you an example.

Hi Oussama. Thanks for the response. If you could provide me with an example I would be very grateful. As you probably have noticed via this thread I am fairly hopeless at this. Thanks.

Hello @jpunshon

So we have 2 pages:

Page 1 (Lets call it Admin page) :

In this page there is 1 form with 3 inputs: User Email - Title - Upload button

in this page you dont need eny code, you gonne just make a collection and name it " Uploads" for example and add a Dataset to this page.
This is how :

Page 2 (Lets call it Client page) :

In this page you gonna need a pepeater with a text box and a button to download the received files:

After setting up the repeater, you just need to connect everything with the database and add a simple code to this page.
This is how :

to add the code you nees to do this :

This is the full code (This code filtre the dataset to show only the files with the email equal to the curent user’s email):

import wixUsers from 'wix-users';
import wixData from 'wix-data';

$w.onReady(function () {
let user = wixUsers.currentUser;
let userEmail;
user.getEmail().then( (email) => {userEmail = email;
$w("#dataset1").onReady(() => {
.eq("email", userEmail)
} );

And boom, your pages are ready, when you upload a file in the Admin page, the user who has logged in with the same e-mail you entered will see and can download the file in the client page.

I hope this will help you.


Thanks @ Oussama , You are an absolute legend!

Quick Question: my coding isn’t indented out like in the example video, is that important?

Hello @oussamaismaili7 this works great but I need to add something to this code: I’d like to be able to see both the mails that are sent to my mail, but also the ones that I upload. How should I change the code?

Thank you

@ Oussama Hi, Only my admin account seems to be able to view the uploaded pdf’s any suggestions?

that might be because your database is set to Admin-only. You can change the settings to ‘custom use’. Then you need to set the custom settings that fits your needs.
That could solve the problem.

How can we add in the code to hide the uploads if there is no user logged in? Currently, if there is no user signed in, it will show the uploads of everything. Aside from this, the code is exactly what I was looking for!

1 Like

You’re the man!! Thank you very much for this!
There’s just one little issue happening, when a member access his private area to check for the files I sent him it shows all the files the i’ve sent to all members until the page loads completely, then it hides other people files.
Do you know what might be happening?