Does Nextcloud support PHP streamWrapper interface?

hi

on my website written in php I would like to have large file upload. The file should be actually stored in Nextcloud.

My question is

  • whether it is possible to use TUS to upload files.
  • or if you can see any other way to upload large files for my website users.

Thank you
Radek

You can create a share and let user upload to it (share link with option File Request/File Drop), that is for upload only.

You can directly use the webdav backend of Nextcloud (best is a specific user for that), then I don’t know if TUS supports webdav, I found this, but it is very old: HTTP_WebDAV_Client/HTTP/WebDAV/Client/Stream.php at master · pear/HTTP_WebDAV_Client · GitHub
Perhaps you’ll find something up to date.

1 Like

hi

last time I checked large ( > 2GB) file upload using resumable is supported only for logged users. So I guess your suggestion will not work.

If I use php webDav client then the file must be first uploaded to webserver and only then to Nextcloud. It would be easier if TUS can handle even upload to Nextcloud.

Thank you
Radek

You could just upload the file via TUS to a local folder, and then use the external storage feature in Nextcloud to access this folder (or SFTP, …).

Nextcloud provides webdav interface to transfer files. Webdav is not Nextcloud specific, for that reason you might already find implementations.

To have it work with Nextcloud, the best way to have such a thing as an app directly within Nextcloud. There have been upload tools, but they were discontinued… (e.g. Flow Upload - Apps - App Store - Nextcloud)