Question

I have few uploads in this app, uploading csv files is working fine.

I have a model that has zip upload in it. Zip file is uploaded, can be viewed, but having issues extracting it.

class Message(models.Model):
    uploadFile = models.FileField(_('images file (.zip)'),
                                    upload_to='message/',
                                    storage=FileSystemStorage(),
                                    help_text=_(''))

The error is

IOError at /backend/media/new

(13, 'Permission denied')
Was it helpful?

Solution 2

it works with ZipFile.extractall

OTHER TIPS

It's not really an issue with the zip file, it's probably an issue with your directory's permissions.

Take a look at the permissions for /backend/media/new. Is new a folder being created by the zip or is that where you're trying to unzip too? Make sure the groups for the folders also match.

Here's a great tutorial on chmod and permissions in general.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top