# Upload error - directory permission issue?

**URL:** <https://community.transloadit.com/t/upload-error-directory-permission-issue/14997>\
**Category:** Uppy\
**Created:** [July 31, 2019, 2:56pm UTC](https://community.transloadit.com/t/upload-error-directory-permission-issue/14997 "2019-07-31T14:56:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmanickam](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@tmanickam](https://community.transloadit.com/u/tmanickam)\
**Post date:** [July 31, 2019, 2:56pm UTC](https://community.transloadit.com/t/upload-error-directory-permission-issue/14997/1 "2019-07-31T14:56:16Z")

</div>

I’m new to uppy.  
I’ve just copy pasted the demo index file to my domain.  
But when I try to upload I’m getting an error 404.  
Can someone tell me what is the issue here:  
[https://www.kattadam.in/skyrail/up.html](https://www.kattadam.in/skyrail/up.html)

---

<div class="post-metadata">

**Author:** ![goto-bus-stop](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/goto-bus-stop/32/18_2.png) [@goto-bus-stop](https://community.transloadit.com/u/goto-bus-stop)\
**Post date:** [July 31, 2019, 3:01pm UTC](https://community.transloadit.com/t/upload-error-directory-permission-issue/14997/2 "2019-07-31T15:01:47Z")

</div>

You’ve configured the endpoint to be [https://www.kattadam.in/skyrail/animation/](https://www.kattadam.in/skyrail/animation/). Is that supposed to exist?

---

<div class="post-metadata">

**Author:** ![tmanickam](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@tmanickam](https://community.transloadit.com/u/tmanickam)\
**Post date:** [August 2, 2019, 4:44pm UTC](https://community.transloadit.com/t/upload-error-directory-permission-issue/14997/3 "2019-08-02T16:44:12Z")

</div>

Yes,  
the directory exists  
[https://www.kattadam.in/skyrail/animation/](https://www.kattadam.in/skyrail/animation/)

---

<div class="post-metadata">

**Author:** ![goto-bus-stop](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/goto-bus-stop/32/18_2.png) [@goto-bus-stop](https://community.transloadit.com/u/goto-bus-stop)\
**Post date:** [August 14, 2019, 8:43am UTC](https://community.transloadit.com/t/upload-error-directory-permission-issue/14997/4 "2019-08-14T08:43:37Z")

</div>

Hmm, there may be a misunderstanding here. The endpoint needs to contain code that can receive uploads; Uppy cannot just put files in a directory, that would be extremely insecure 🙂

If you want to use the Tus plugin, you need an endpoint that complies with the Tus protocol. There are libraries implementing it for different programming languages. For Node.js, there is the [tus-node-server](https://github.com/tus/tus-node-server). For PHP, there is [tus-php](https://github.com/ankitpokhrel/tus-php). You can also run a separate standalone server to handle uploads using [tusd](https://github.com/ankitpokhrel/tus-php), but that’s a little more advanced.

You can also start off with the XHRUpload plugin, which does a “normal” multipart upload, which is supported by default by many web frameworks and languages like PHP.

---

<div class="post-metadata">

**Author:** ![guy](https://avatars.discourse-cdn.com/v4/letter/g/9e8a1a/32.png) [@guy](https://community.transloadit.com/u/guy)\
**Post date:** [August 20, 2019, 5:04pm UTC](https://community.transloadit.com/t/upload-error-directory-permission-issue/14997/5 "2019-08-20T17:04:09Z")

</div>

I using an Apache server from a commercial host site and I want to upload files to it via Uppy. I’m using the demo Uppy code and modifying the endpoint URL, but I get a 404 error. I’ve put a .htaccess file in the destination directory and the Tus server.php file, but I’m lost. It would be very helpful if you could indicate what files I need to put on the server, what those files need to contain and where (in which folder) and any other server configuration that needs to be done.

Here’s the HTML code:  
\<!doctype html\>

 Uppy 

```
<script src="https://transloadit.edgly.net/releases/uppy/v1.3.0/uppy.min.js"></script>
<script>
  var uppy = Uppy.Core()
    .use(Uppy.Dashboard, {
      inline: true,
      target: '#drag-drop-area'
    })

```

// .use(Uppy.Tus, {endpoint: ‘[https://master.tus.io/files/](https://master.tus.io/files/)’})  
.use(Uppy.Tus, {endpoint: ‘uploads/’})

```
  uppy.on('complete', (result) => {
    console.log('Upload complete! We’ve uploaded these files:', result.successful)
  })
</script>

```

Here’s the .htaccess file which I put in the uploads/ folder:

# .htaccess

RewriteEngine on

RewriteCond %{REQUEST\_FILENAME} !-f  
RewriteRule ^files/?(.\*)?$ /server.php?$1 [QSA,L]
