Skip to content
New issue

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

models: per bucket file size limits #61

Merged
merged 1 commit into from
May 24, 2016
Merged

models: per bucket file size limits #61

merged 1 commit into from
May 24, 2016

Conversation

SamiHiltunen
Copy link
Member

  • Adds a per bucket maximum file size limit.
  • File size limits are now checked while writing the object.

Signed-off-by: Sami Hiltunen sami.mikael.hiltunen@cern.ch

FILES_REST_DEFAULT_MAX_FILE_SIZE = None
"""Default maximum file size for a bucket."""

FILES_REST_SIZE_LIMITERS = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/FILES_REST_SIZE_LIMITERS/FILES_REST_SIZE_LIMITER/ plural -> singular ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or alternatively the doc text should be in plural

@coveralls
Copy link

coveralls commented May 24, 2016

Coverage Status

Coverage decreased (-1.06%) to 90.909% when pulling cbcda7e on SamiHiltunen:file-size-limiters into f9d958e on inveniosoftware:master.

@coveralls
Copy link

coveralls commented May 24, 2016

Coverage Status

Coverage decreased (-0.8%) to 91.153% when pulling 7ab0bad on SamiHiltunen:file-size-limiters into f9d958e on inveniosoftware:master.

@coveralls
Copy link

coveralls commented May 24, 2016

Coverage Status

Coverage decreased (-1.3%) to 90.713% when pulling 7ab0bad on SamiHiltunen:file-size-limiters into f9d958e on inveniosoftware:master.

obj = ObjectVersion.create(bucket, key)
obj.set_contents(uploaded_file, size=content_length)
db.session.commit()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you still need a db.session.commit() outside the with-statement?

@coveralls
Copy link

coveralls commented May 24, 2016

Coverage Status

Coverage decreased (-0.4%) to 91.572% when pulling 9fbec2d on SamiHiltunen:file-size-limiters into c3a7256 on inveniosoftware:master.

* INCOMPATIBLE Changes the file size limiter interface.

* NEW Adds a per bucket maximum file size limit.

* File size limits are now checked while writing the object.

Signed-off-by: Sami Hiltunen <sami.mikael.hiltunen@cern.ch>
@coveralls
Copy link

coveralls commented May 24, 2016

Coverage Status

Coverage increased (+1.3%) to 93.28% when pulling e333687 on SamiHiltunen:file-size-limiters into c3a7256 on inveniosoftware:master.

@coveralls
Copy link

coveralls commented May 24, 2016

Coverage Status

Coverage increased (+1.3%) to 93.28% when pulling 4bc5915 on SamiHiltunen:file-size-limiters into c3a7256 on inveniosoftware:master.

@SamiHiltunen
Copy link
Member Author

@lnielsen I've fixed the issues you found

@lnielsen lnielsen merged commit 4bc5915 into inveniosoftware:master May 24, 2016
@SamiHiltunen SamiHiltunen mentioned this pull request May 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants