Folder that deletes files after upload locally

Hi,
please excuse me if im totally wrong in this part of the forum or if i havent read the manual carefully enough.

I would like to be able to have a folder, shared within a group, that deletes its content locally after the content has been uploaded to the cloud.

The Background is that im setting up a laptop for audio recordings.
We have several Bands playing at our place each week.
I`d like to be able to record these the audio files ont the laptop, then store them to a Nextcloud folder that distributes them to several other Users as well as to my server.
But i would like to have the files deleted localy on the recording Machine once they are uploaded.
Is there some functionality like a “Upload-Only” folder that makes it possible to only-upload files into a cloud storage, but not to have it stored locally or have the files to upload beeing deleted locally after the upload ist done ?

Is there a work-around ?

thanks for your help
all the best
Peer

You could do this by automatically moving the uploaded files in a certain folder (the “Upload-Only” folder) to another folder that is not synced with your laptop.

Unfortunately there is no app I know of that enables you to do this. The workaround is a custom script and a cronjob, that checks this folder periodically, moves the files (without Nextcloud knowing it) and rescans the filesystem (to tell Nextcloud).

If I remember correctly, this is not really safe though (according data corruption/loss) in normal folders, but should be safe to use in external storages.

Better wait for some more experienced members to double check my answer.
I am using such a solution for my pictures and never had a problem, but I could just be lucky :wink:

Hi There

I am rather new to NC and perhaps I am misunderstanding the goal. Can I assume you are using the desktop client to upload the files? Is this something you want to happen automatically? I do now that there is no real “sync” when using the browser to upload files so when you upload through the browser you can safely delete the files from your laptop and still have the files exist on NC…but this would mean you have to upload the files manually. Is uploading manually something you are hoping to avoid?

Rob

Hey thanks for your replies !
I`d like to have a solution where some random user at an evening cann put the 30G of .wav data into a folder on that laptop (wich has only about 256GB Storage locally), that then uploads the files automatically to the cloud but deletes them locally afterwards.
This way we could tell the people just to move the files over to that on folder after done recording and then it would be available for all users on the cloud later, but not be on that laptop anymore.
sorry its late, my english is getting worse every minute …

all the best
Peer

I use one NC Instance as an unidirectional document submission service.

Therefore:

I created a central user (i.e. sharemaster).
This user creates a folder named “User1” and shares it with User1 (Write only, if necessary).

If the sharemaster User receives the doc or wav or whatever, he moves it to a private folder. So it gets deleted on the desktop of User1.

Does this help? Its a kind of a workaround i admit, but it could do the trick.
Maybe you can automate this with a script on the computer of th sharemaster user.

1 Like

Hi,
Yes, this is the workaround i was looking for.
One could for example, on linux, have a cron job that makes rsync move the files automatically from the shared upload folder to another shared folder, that is not shared with the inital uploader.
thank you very much.

Peer

1 Like

Hello There! I am still wondering if there is a way to delte the local files after uploading them?