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

Improvements to file upload post processing #483

Merged
merged 1 commit into from
Jul 21, 2016
Merged

Conversation

oliverroick
Copy link
Member

  • Fixes File icons for resource list thumbnail previews #355 — Adds standard thumbnails for various file types
  • Adds video/mp4 to the list of accepted mime types for file upload
  • Improves process to create thumbnails. The file is now only downloaded for post processing when the mime-type indicates an image.
  • Adds a migration to change the mime_type field maximum length to 100, to make sure that users can add Office2007+ documents.

@@ -82,13 +82,43 @@ def file_type(self):

@property
def thumbnail(self):
icon_url = ('https://s3-us-west-2.amazonaws.com/cadasta-platformprod'
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you not want to make this URL something that lives in the settings?

- Fixes #355 — Adds standard thumbnails for various file types
- Adds `video/mp4` to the list of accepted mime types for file upload
- Improves process to create thumbnails. The file is now only downloaded for post processing when the mime-type indicates an image.
- Adds a migration to change the mime_type field maximum length to 100, to make sure that users can add Office2007+ documents.
- Add MIME_LOOKUPS setting, which provides a list of accepted file types and the corresponding default thumbnail. This setting is also used in resources.validators to validate mime types
@oliverroick
Copy link
Member Author

@ian-ross Added your suggestions.

@ian-ross ian-ross merged commit d0124a3 into master Jul 21, 2016
@ian-ross ian-ross deleted the enhancement/#335 branch July 21, 2016 12:33
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.

2 participants