Rsync files to ”recommended files” dashboard

Im looking for a way to transfer files from
PathA locally to www-data with a public ip
to the ”recommend files” in nextcloud

Where is the recommended files location?
I cant find it.

I’m not into the dashboard app development but as far as I know, the recommended files on the dashboard are only the files with the latest activity. If you want to place things there, try to sync them to the user’s “files” folder. You may need to run occ files:scan and if the files already exist in the folder, you need to manipulate the database.
Why do you need to rsync them? It would be much easier to sync them with a webdav or nextcloud client because that would automatically add them to the user’s dashboard if changes were made.

1 Like

thank you i will test that. Firefox has an awesome extension where you can copy text snippets and then it will automatically download selected text. And then i want a Cronjob linked to that directory wich will send the files to public ip + port.
To ”recommended folders” so its easy accessable. I know its doable and i will do it.
Just gotta come up with the right solution
You think webdav is the right solution for
The send part? :slight_smile:

You could try following setup:
The extension saves the text snippet to a directory (e.g. /tmp/snippets)
Then a Cronjob reads the files in there and sends it via webdav to your nextcloud (e.g. cadaver).
You could try to convert the (txt?) files into a Markdown file (.md) because the NextCloud text app supports that.
After a successful operation the script deletes the snippet out of /tmp.
If you use WebDav to upload a new file, it automatically appears on the recommended files widget.
Using WebDav is the best method to achieve that because writing to the filesystem directly (with ftp, rsync or whatever) would mean that nextcloud needs to rescan the filesystem all the time.

Recommended files are indeed just computed by asking storage and other APIs for recent changes.

And I agree that rsync’ing to Nextcloud storage is sub-optimal. Try to change your data through Nextcloud if you like consistency.