-
Notifications
You must be signed in to change notification settings - Fork 457
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
DRAFT of "file attachments" #5202
Conversation
Apply fixes from StyleCI
Apply fixes from StyleCI
Apply fixes from StyleCI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked out and tested the web-facing functionality on my dev system successfully. Also the directory creation needs to use the correct mode (0755
) instead of 600
.
I haven't looked into the WEBDAV functionality yet, but I can see the path (/CRM/wbdav
) being buried in the code causing problems:
- users changing code will trigger a file integrity warning
- obscure config requirement; ideally users shouldn't need to go beyond
Include/Config.php
and the system settings in the web interface.
TODO: Maybe this should be in the upgrade class?
Created API for enumerating all files for a family Fixed non-JSON responses for uploaded files
What's this PR do?
creates a new database table for "files" and one for "file associations"
Files can be created / deleted / retrieved from both the person and family(v2) views.
Files associated with a person are displayed on the person page.
Files associated with a family are displayed on the V2 family page.
A rudimentary WebDAV implementation is provided as well to provide file access via external client.
The underlying file storage mechanism is as follows:
File storage implementation
UserData
directory is created in thesrc
folder (if it doesn't already exist)UserData
, a top-level subdirectory is created with the first character of the SHA256 hash of the file; A second-level subdirectory is then created with the second character of the hash in like-manner. (This avoids a large-gathering of files in one folder, and prevents users from creating files with "stupid characters" that make things messy server-side)file retrieval implementation
Response
objectScreenshots (if appropriate)
Related Issues:
#122
#350
#4658
#4800
#4786
#4498