Repository navigation
PPP file upload/download fix - #1126
Merged
Merged
Conversation
Comment: Added a cast to is_private as psalm complained about negating an int. On review, it seems we never directly print is_private, and the only contexts we use it in are as a boolean. So the cast is appropriate (we only use it as a boolean anyway), and no accessors required modification because they're all in if()'s or used in ternary to print lock/unlock logos.
…would still hit the controller, and would trigger a 500 because isValid was not checked. also, in frontend, check response status, can detect uploads beyond post_max_size as they're rejected with 413 Content Too Large
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per #1123, files can be uploaded to a patch panel port but not downloaded. This PR updates the file download to use the new file store. A migration step is required to migrate files from the old store to the new store.
Under the hood, it's using the system default filesystem,
localinconfig/filesystems.php(files are stored instorage/app/files/ppp). I wonder, if we are to fix it, do we consider giving them their own 'filesystem' like we do docstore / docstore_customers? There's a migration step either way, so now seems a good time to consider it.To migrate the old store to the new store, the following command should be run. The -a flag will preserve file permissions, ownership user/group, timestamps, context, and extended attributes.
cp -a $IXPROOT/storage/files/ppp/. $IXPROOT/storage/app/files/ppp/Other work:
togglePrivacyonPatchPanelPortFileandPatchPanelPortHistoryFile, and use the boolean cast onis_private(see note below)PPP\FileControllerandPPP\HistoryFileController(tested. fairly safe as there's no form stuff happening)Comment:
Added a cast to is_private as psalm complained about negating an int. This was invisible before using the update([]) syntax. On review, it seems we never directly print is_private, and it's only ever used as a logical boolean value (if statements and ternaries expressions). So the cast is appropriate and no reads required modification
Fixes #1123