Automatically upload, share, generate link with expiration date

Hello, everybody,

I finally installed Nextcloud and I am very satisfied. Now I have a special concern and would like to know whether the problem can be solved at all and if so, how best to tackle it

I create files (.pdf,.docx etc.) with another program. These files should be automatically uploaded to the cloud. The files should also be shared automatically with a link. And the link needs an expiration date.

So far, this scenario has proved to be a good example:
I receive invoices every month (rent, electricity, car etc.)
My program creates a total invoice from these invoices (TotalInvoiceJanuary.PDF)

  • TotalInvoiceJanuary.PDF should now be uploaded automatically (WebDAV/Windows Network drive?)

  • The file should now be shared automatically with a link. The link should have an expiration date(14 days)

(In the best case the link should be catched again to insert it into a mail)

  • One month later, of course, the whole thing will start all over again with TotalInvoiceFebruary.PDF

I dont want to solve the problem manually. I value that it happens automatically.
I can’t just share a folder because the expiration date on the files won’t work.

I suspect I have to write a small program with direct access via the Share API. My knowledge is limited to the absolute minimum. Do you have any concrete details for my problem or at least good instructions?

Thank you very much for your time and your answers
Kathaki

#push

Anyone an idea?

Thank you

I also found this https://docs.nextcloud.com/server/9/developer_manual/core/ocs-share-api.html

How can I use the API? Can I write a windows tool with curl or is it just for android?

Sounds great. Thank you splitt3r

I am unfortunately not a programmer and would be very happy to see an example. Is there a script/tool with open source code that I can view and learn from?

The automatic upload is an easy fix. You can use the NC client or WebDAV.

The file share link with expiration is also already in the system. Automating it will be the tricky part. I don’t know if any built in function to do this.

What do you intend for it to do with the share links once generated? Will you not have to go get the link and manually send it to someone? At that point you’re only a couple clicks from having shared it by hand anyway.