All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
0.8.0 — 2019-02-28
- ActiveStorageProvider now passes custom headers down to the DirectUploadProvider it uses. This change is to better support users who customize their DirectUploadsController, in response to this conversation.
- ActiveStorageProvider accepts the
directUploadsPath
so users who have customized their DirectUploadsController don’t need to use DirectUploadProvider directly.
0.7.0 — 2019-01-03
- Removed error when CSRF meta tag does not exist. Thanks, @SampsonCrowley
0.6.0 — 2018-10-23
- Added an optional
headers
prop so that custom headers can be passed. Thanks, @kceb
- If
X-CSRF-Token
is included in theheaders
prop, we are no longer fetching the CSRF token from the meta tags.
- Removed the special-case
token
prop in favor of the more generalheaders
prop, to which you can pass the Authorization header. You can replacetoken="Bearer asdf"
withheaders={{ Authorization: 'Bearer asdf' }}
0.5.0 — 2018-10-19
- Exposed a lower level component
DirectUploadProvider
that creates aBlob
record and uploads the file, then returns the attachment IDs for the consumer to attach. - Allows choosing files and beginning their upload to be two separate processes by adding two more callbacks to RenderProps.
0.4.0 — 2018-10-12
- Accepts an
onError
callback prop. If saving the model returns an error status code, such as from failed validations, we need to be able to alert the user.
0.3.0 — 2018-08-06
- Added a
token
prop so that a JWT for the Authorization header can be passed. Thanks, @MikeKotte
0.2.0 — 2018-06-26
handleUpload
now takesFile[]
orFileList
for greater flexibility.
0.1.1 — 2018-04-30
- Correctly send multiple blob ids for multiple attachments.
0.1.0 — 2018-04-27
- Allows host to be configured, since some apps host their front-end on a different server than their API. Thanks, @derigible
0.0.3 — 2018-02-12
- Exports flow types so you can import them
0.0.2 — 2018-02-09
- Parses the server response as JSON automatically and calls
onSubmit
with the contents of the response body - Uses
Accept: 'application/json'
so you don’t need to endendpoint.path
with.json
- A component that handles the direct upload of a file to an ActiveStorage service and calls render props with arguments that let you build your own upload widget.