08th Nov2012
Author: Gyro

Problems uploading files to ownCloud

I've installed ownCloud a while back and finally got around to test it today.

As ownCloud has a "Music" section, I figured I start by uploading some of my music. I first tried uploading an MP3 file via the web interface, but the spinning wheel would never go away, and an eventual refresh showed no new file. I then tried it with a few small files, and realized that anything over 1MB file size will result in the file not being uploaded, and the original gets deleted by the owncloud sync tool when it was used to upload/sync the file.

By the way, you upload music to your "Files", they will appear under "Music" after that (you may have to click on the button to rescan the library).

Next I installed the sync client for Ubuntu, by adding the repository and using apt-get to download and install it. Once installed and setup, I copied a MP3 file into the sync folder, and the tool started to upload it. Once the sync app appeared to be done syncing, I checked the web interface. I could not find the new MP3 file anywhere, and even worse, the file got deleted from my sync folder! So instead of uploading the file, it obviously failed uploading, and then got deleted (when doing the next sync and not finding that file online).

This is a SERIOUS flaw in the owncloud client (Version 1.1.1). I would recommend using another WebDAV client, until the owncloud client and sync process is properly working and features the needed redundancy to realize an error in syncing, so it stops to treat the original file on the hard drive as if it is a file that needs to be deleted, since it is "no longer" available on the server.

However, back to the actual problem, I found out that it had to do with the max file size. I started using nginx, instead of Apache, as it simply better and I am not a dinosaur and know when it is time to adept. However, I have used Apache for over 10 years… and I am a total n00b when it comes to nginx, so just about anything I want to do, requires lots of searching, as the nginx community is still rather small compared to Apache. I know I am not the only one having difficulties getting into nginx, so here is the solution of how to fix problems uploading files to ownCloud when using nginx.

To be able to upload larger files to ownCloud, simple edit nginx.conf and add client_max_body_size to the http definitions:

http {

client_max_body_size 64M;

}

Where 64M stands for a max file size of 64MB, this will make uploading via the web interface as well as the client work. The exact same fix would have to be done for apache, you can find 1000s of pages telling you how to increase the max file size or post size in Apache… this is not going to be one of them! :P

5335

Keep Me Going
Your Name / Website:
Did you like my post? Buy me a Bitcoffee! 14JX52Li7zTKbyQv2omw4tvu6Bi1KzfHNW



Leave a Reply

Your email address will not be published. Required fields are marked *

What is 5 + 4 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)