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

Get develop into master #1207

Merged
merged 6 commits into from Sep 3, 2020
Merged

Get develop into master #1207

merged 6 commits into from Sep 3, 2020

Conversation

FinalAngel
Copy link
Member

  • In models.File, add field mime_type to store the Content-Type as set by
    the browser during file upload.
  • For extended Django Filer models, adopt the classmethod matches_file_type to its
    new signature.
  • Add attribute download to the download link in order to offer the file
    under its original name.

jrief and others added 2 commits September 3, 2020 14:19
* Store mimetype of uploaded file in database

* Fix a few CI errors

* set default mime_type to application/octet-stream

* Server.serve() now accepts a filer.File object

* Fix: JPG testimage shall be uploaded with Content-Type image/jpeg

* fix flake8 complaints

* Use NotImplementedError

* fix flake8 complaints

* describe changes

* use master branch instead of develop

* add additional tests to support MIME type

* check that content-type is stored by django-filer

* Allow latest unidecode version (#1171)

* Allow latest unidecode version

Resolves dependency issue in other projects where Unidecode >= 1.1 is needed.

* Fix annotation by @yakky on PR #1152

* use url instead of path to guess mime-type

* Use property ‘download’ to reuse original filename (#1169)

* Use property ‘download’ to reuse original filename

* add feature to changelog

Co-authored-by: Angelo Dini <angelo.dini@divio.ch>
Co-authored-by: Ashish Patil <ashishnitinpatil@gmail.com>
# Conflicts:
#	docs/running_tests.rst
#	filer/models/filemodels.py
#	filer/server/backends/base.py
#	filer/utils/files.py
#	tests/test_admin.py
@FinalAngel
Copy link
Member Author

FinalAngel commented Sep 3, 2020

@jrief and @yakky here to PR to get it into master

@FinalAngel
Copy link
Member Author

After this is merged, I can release - any other PRs to merge as well?

@yakky
Copy link
Member

yakky commented Sep 3, 2020

@jrief is much more up to date than me regarding important PRs to be merged

@yakky
Copy link
Member

yakky commented Sep 3, 2020

@FinalAngel I edited a documentation note

Probably it's better to add this https://github.com/divio/django-filer/pull/1207/files#diff-70df4411a50fd8fafbe1cff6f3b283b6R55 in the changelog as a breaking change to properly communicate it

@codecov-commenter
Copy link

codecov-commenter commented Sep 3, 2020

Codecov Report

Merging #1207 into master will decrease coverage by 0.05%.
The diff coverage is 75.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1207      +/-   ##
==========================================
- Coverage   70.90%   70.84%   -0.06%     
==========================================
  Files          63       64       +1     
  Lines        3052     3077      +25     
  Branches      436      439       +3     
==========================================
+ Hits         2164     2180      +16     
- Misses        735      742       +7     
- Partials      153      155       +2     
Impacted Files Coverage Δ
filer/server/views.py 38.88% <0.00%> (-1.12%) ⬇️
filer/utils/files.py 69.51% <60.00%> (-1.16%) ⬇️
filer/models/filemodels.py 86.30% <62.50%> (-0.50%) ⬇️
filer/migrations/0012_file_mime_type.py 72.72% <72.72%> (ø)
filer/admin/clipboardadmin.py 83.56% <100.00%> (+0.22%) ⬆️
filer/models/abstract.py 76.92% <100.00%> (ø)
filer/server/backends/base.py 90.00% <100.00%> (-0.91%) ⬇️
filer/server/backends/default.py 100.00% <100.00%> (ø)
filer/server/backends/nginx.py 100.00% <100.00%> (ø)
filer/server/backends/xsendfile.py 100.00% <100.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 29eea04...d7d4f82. Read the comment docs.

@jrief
Copy link
Collaborator

jrief commented Sep 3, 2020

After this is merged, I can release - any other PRs to merge as well?

I just went through all open pull requests. The only one, I would consider to merge is #958. This however has to be slightly changed (requested by @yakky, but never done by the original author).

Otherwise I'm OK with merging this pull request.

Just one side-note: I would really appreciate, if we could add a JSON field to the File class in the future. With Django-3.1 this wouldn't even required any third party dependency. Such a field would allow us to store arbitrary data, such as EXIF-headers, and other useful stuff without having to override the class. – just my two cents

@FinalAngel
Copy link
Member Author

@jrief that's probably best to discuss with @divio/django-cms-core

@FinalAngel FinalAngel merged commit 3ba0e04 into master Sep 3, 2020
@FinalAngel FinalAngel deleted the release/updates branch September 3, 2020 15:54
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

4 participants