Problems with uploading files...

Problems with uploading files...

by Cosmo Furno Palumbo -
Number of replies: 9

Trying to import new users (an operation I had already successfully done in the past few days), I realized that if I try to upload any file to the platform, be it a .csv file to import users or any file in the repository of "Personal Files" (something that I had also tried successfully in the past few days), the server replies with a generic:

Error. The file 'filename.extension' is empty or is a folder.
To upload the folders, you need to compress them in zip format.

I tried to activate debugging mode as well but it doesn't give me any more specifics about the error.

Do you have any suggestions?

This is a Moodle 3.10.1+ installation on Ubuntu Server 20.04.

Average of ratings: -
In reply to Cosmo Furno Palumbo

Re: Problems with uploading files...

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You absolutely sure that it's not... "empty or a folder". Did you compress the data (good) or did you compress a folder containing the data (bad - notice the difference)?
In reply to Howard Miller

Ri: Re: Problems with uploading files...

by Cosmo Furno Palumbo -
Of course it's not empty... the file I tried to upload is a .csv file that I personally generated and opened with multiple software to make sure it was written correctly. It is not a compressed file.

Furthermore, as I said in the previous post, I tried to import into the personal area also other types of files such as trivial .png and I always get the same error.
In reply to Cosmo Furno Palumbo

Re: Ri: Re: Problems with uploading files...

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Ok - create a minimal file that shows this problem (fake data of course) and post it here. Let's elimiate that it isn't the file.
In reply to Howard Miller

Ri: Re: Ri: Re: Problems with uploading files...

by Cosmo Furno Palumbo -

This is an example of .csv file that I create to import users, but I want to emphasize again that trying to upload a .png or .jpg files in the repository staff get the same result.

In reply to Cosmo Furno Palumbo

Re: Ri: Re: Ri: Re: Problems with uploading files...

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Does uploading a file *anywhere* work? That is, are all file uploads broken? If not, we need to work out what's the difference between ones that do and ones that don't.

If you haven't already, check your web server's error log for possible errors (they don't always show on screen)
In reply to Howard Miller

Ri: Re: Ri: Re: Ri: Re: Problems with uploading files...

by Cosmo Furno Palumbo -
...maybe I solved it !!!

Given that, as I said in my previous posts, the uploading of any file didn't work, to scruple I tried to change the browser and, using Chrome instead of Safari, magically, everything works. 🙄
In reply to Howard Miller

Ri: Re: Ri: Re: Ri: Re: Problems with uploading files...

by Cosmo Furno Palumbo -
Obviously the question remains: why few days ago it also worked on Safari without problems?! But at least I have buffered the immediate situation.
In reply to Cosmo Furno Palumbo

Re: Ri: Re: Ri: Re: Ri: Re: Problems with uploading files...

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It's not unheard of... sometimes the javascript cached in the browser gets corrupted.

You might want to try clearing your caches in Safari.
In reply to Howard Miller

Ri: Re: Ri: Re: Ri: Re: Ri: Re: Problems with uploading files...

by Cosmo Furno Palumbo -
Yes... indeed... the next step was just that!
After clearing the Safari cache it started working again without problems.
I hope that my experience, reported on the forum, can at least be an example for others. Avoiding going crazy behind a banality... 🤪
Many thank's Howard for supporting a newbie like me!