We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content types which extend File w/ custom properties cannot currently get those properties processed cleanly by the base add view.
File
Its add_success should pop() the known/mandatory properties, and then, when calling _makeOb, pass the remainder via **kw. E.g.:
add_success
pop()
_makeOb
**kw
def add_success(self, appstruct): name = appstruct.pop('name') title = appstruct.pop('title', None) filedata = appstruct.pop('file') mimetype = appstruct.pop('mimetype', USE_MAGIC) stream = None filename = None if filedata: filename = filedata['filename'] stream = filedata['fp'] if stream: stream.seek(0) else: stream = None name = name or filename fileob = self._makeob(stream, title, mimetype, **appstruct) self.context[name] = fileob return HTTPFound(self.request.sdiapi.mgmt_path(self.context))
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Content types which extend
File
w/ custom properties cannot currently get those properties processed cleanly by the base add view.Its
add_success
shouldpop()
the known/mandatory properties, and then, when calling_makeOb
, pass the remainder via**kw
. E.g.:The text was updated successfully, but these errors were encountered: