# Share a File from nextcloud to my app website

**URL:** <https://help.nextcloud.com/t/share-a-file-from-nextcloud-to-my-app-website/128183>\
**Category:** 🏷️ General\
**Tags:** docker, webdav\
**Created:** [November 29, 2021, 9:38am UTC](https://help.nextcloud.com/t/share-a-file-from-nextcloud-to-my-app-website/128183 "2021-11-29T09:38:31Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![gas85](https://help.nextcloud.com/user_avatar/help.nextcloud.com/gas85/32/7772_2.png) [@gas85](https://help.nextcloud.com/u/gas85)\
**Post date:** [November 29, 2021, 12:25pm UTC](https://help.nextcloud.com/t/share-a-file-from-nextcloud-to-my-app-website/128183/2 "2021-11-29T12:25:44Z")

</div>

What is your use case?

1. You would like to access files from website via Nextcloud to be able to change them?  
Then add volume as you wish e.g.

```yaml
volumes:
    # Format:
    # - /Local/Machine/folder:/container/folder
    - /var/www/html:/nextcloud/myWebSite

```

After this, via nextcloud Settings → External Storages add `/nextcloud/myWebSite` as external local storage and that’s it.

1. You would like to save and manage files in Nextcloud and give an access to content (e.g. pictures) via links to your website?

> [@Lejla94](#):
>
> The url trying was: `https://example.com/nextcloud/remote.php/dav/files/USERNAME/`

For Webdav you need to have user/password, **but** you can simply share folder and then access files via link, e.g.:

> [@Access a shared folder with a bash script (davfs?)](https://help.nextcloud.com/t/access-a-shared-folder-with-a-bash-script-davfs/79410/3):
>
> just:
> 
> ```auto
> curl https://domain/index.php/s/SHARE_ID/download?path=/?files=fileName.exe
> 
> ```
> 
> if file under subfolder of shared folder then:
> 
> ```auto
> curl https://domain/index.php/s/SHARE_ID/download?path=/Some/Sub/Folder?files=fileName.exe
> 
> ```

Read a bit more about: [Прямая ссылка на изображение в общей папке - #6 by gas85](https://help.nextcloud.com/t/pryamaya-ssylka-na-izobrazhenie-v-obshhej-papke/40377/6) or here: [Access a shared folder with a bash script (davfs?) - #3 by gas85](https://help.nextcloud.com/t/access-a-shared-folder-with-a-bash-script-davfs/79410/3)

---

_[View the full topic](https://help.nextcloud.com/t/share-a-file-from-nextcloud-to-my-app-website/128183)._
