equal
deleted
inserted
replaced
235 |
235 |
236 def uploadFile(self, uploadedfile, **kwargs): |
236 def uploadFile(self, uploadedfile, **kwargs): |
237 if uploadedfile is not None: |
237 if uploadedfile is not None: |
238 fobj = getattr(uploadedfile, "file", None) |
238 fobj = getattr(uploadedfile, "file", None) |
239 if fobj is not None: |
239 if fobj is not None: |
240 with open(uploadedfile.filename, 'w') as destfd: |
240 with open(uploadedfile.filename, 'wb') as destfd: |
241 fobj.seek(0) |
241 fobj.seek(0) |
242 shutil.copyfileobj(fobj,destfd) |
242 shutil.copyfileobj(fobj,destfd) |
243 |
243 |
244 def locateChild(self, ctx, segments): |
244 def locateChild(self, ctx, segments): |
245 if segments[0] in customSettingsURLs: |
245 if segments[0] in customSettingsURLs: |