Filesystem write permissions

I improved the error messages that occur when a filesystem assetstore fails due to permission issues.  When we fail to upload a file and we offer to resume the upload, if the user clicks close, the upload was abandoned and unreachable.  This partial upload is now discarded (if possible).

While testing the upload abort, I saw we weren't actually testing chunked uploads to non S3 assetstores through the web client.  I added tests for that, and reduced the required chunk size during the test so that the tests are faster.

This addresses issue #392.
I was thinking that there would be other conditions that would be handled
in teh same way and I would extend this to be a tuple of conditions to
handle.

On Tue, Oct 14, 2014 at 1:59 PM, Zach Mullen <notifications@github.com>
wrote:

> In girder/api/v1/file.py:
>
> > @@ -70,9 +71,14 @@ def initUpload(self, params):
> >                  parentType=parentType, creator=user)
> >          else:
> >              self.requireParams('size', params)
> > -            upload = self.model('upload').createUpload(
> > -                user=user, name=params['name'], parentType=parentType,
> > -                parent=parent, size=int(params['size']), mimeType=mimeType)
> > +            try:
> > +                upload = self.model('upload').createUpload(
> > +                    user=user, name=params['name'], parentType=parentType,
> > +                    parent=parent, size=int(params['size']), mimeType=mimeType)
> > +            except OSError as exc:
> > +                if exc[0] in (errno.EACCES,):
>
> Why use "in" with a 1-length tuple?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/girder/girder/pull/401/files#r18846278>.
>