parse-server
parse-server copied to clipboard
Added request query as an argument to FileController instance in the …
Passed req.query(the request object query property) as a third argument to the instance of FileController's getFileData method called from the FileRouter's getHandler method for files not streamed.
A third and second parameter named query, which is an object that represent the node request object's query property is then added to getFileData method of FileController and FileAdapter classes respectively.
Purpose of Changes:
Some websites perform file manipulation on the fly by adding query string to request URIs(https://example.com/parse/file/X.png?thumbanail=100), such as image resize, converting an image to another format, blur, the list are endless. But parse-server FileAdapter class which is the base class for the beautiful parse-server custom file adapter functionality does not expose the node request query to the children classes(custom file adapters) to be used for manipulating files on the fly.
Exposing the query in the FileAdapter for its children to have access to in the getFileData and passing the query to the getFileData method of the fileController which is called in the getHandler method in the FileRouter is the essence of this pull request.
Thanks.
⚠️ Important change for merging PRs from Parse Server 5.0 onwards!
We are planning to release the first beta version of Parse Server 5.0 in October 2021.
If a PR contains a breaking change and is not merged before the beta release of Parse Server 5.0, it cannot be merged until the end of 2022. Instead it has to follow the Deprecation Policy and phase-in breaking changes to be merged during the course of 2022.
One of the most voiced community feedbacks was the demand for predictability in breaking changes to make it easy to upgrade Parse Server. We have made a first step towards this by introducing the Deprecation Policy in February 2021 that assists to phase-in breaking changes, giving developers time to adapt. We will follow-up with the introduction of Release Automation and a branch model that will allow breaking changes only with a new major release, scheduled for the beginning of each calendar year.
We understand that some PRs are a long time in the making and we very much appreciate your contribution. We want to make it easy for PRs that contain a breaking change and were created before the introduction of the Deprecation Policy. These PRs can be merged with a breaking change without being phased-in before the beta release of Parse Server 5.0. We are making this exception because we appreciate that this is a time of transition that requires additional effort from contributors to adapt. We encourage everyone to prepare their PRs until the end of September and account for review time and possible adaptions.
If a PR contains a breaking change and should be merged before the beta release, please mention @parse-community/server-maintenance and we will coordinate with you to merge the PR.
Thanks for your contribution and support during this transition to Parse Server release automation!