Commit graph

10 commits

Author SHA1 Message Date
Ankush Menat
071e269548 fix!: Switch to creation as default sort order 2024-03-27 11:18:28 +05:30
Hussain Nagaria
8d2137c265 docs: consistent doc strings 2023-12-18 18:27:39 +05:30
Ankush Menat
c55dcc439e
feat: max_file_size configurable from system settings (#22384)
also increase default max_file_size from 10MB to 25MB
2023-09-13 13:33:36 +05:30
Raffael Meyer
6ea739e4cf
refactor(File): explicitly import utils (#22143) 2023-08-23 11:08:22 +05:30
Ankush Menat
4d048cd651 fix: type hint for image view
closes https://github.com/frappe/frappe/issues/19426
2023-01-02 11:50:25 +05:30
Gavin D'souza
029a1fc902 chore: Remove loose types from fn definitions 2022-12-15 13:47:05 +05:30
Gavin D'souza
2327a56abc fix(File): Correct acceptable types in APIs
- Allow str types for start, page_length in page_length API
- Allow str, list[dict] file_list in move_file API
2022-12-15 13:47:05 +05:30
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features (#17367)
refactor: clean up code to py39+ supported syntax

- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes

Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
2022-07-01 11:51:05 +05:30
Gavin D'souza
8db6bf48f6 fix(linting): Sort imports 2022-04-18 18:17:40 +05:30
Gavin D'souza
59e45a2e2f refactor: File APIs
Restructured and moved most APIs under frappe.core.api.file namespace.
Changed some obvious security gaps (like using get_list instead of
get_all for an endpoint), styled, added type hints and made minor performance
enhancements.

Changes
* download_file API
    * Move API to handler.py
    * Check for permissions via File.is_downloadable instead
* Moved APIs to new namespace: `frappe.core.api.file`
* Backwards compatibility
    * Added APIs to override_whitelisted_methods to maintain existing
      client endpoints
    * Imported APIs to controller's namespace to avoid breaking external
      app usages
2022-03-15 19:39:47 +05:30