You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move filename validation into adaptor for AWS "directories". Add preserveFileName Support (#76)
* Add support for the validateFilename method
* Add AWS preserveFileName support with options for "directories"
* Don't extend FilesAdapter (pre-emptive PR request)
* Minor test improvements
* Remove all dependencies. Bump version number
* speling is hard
* Don't encode / when returning urls. closes#75
* Make % safe
* Allow filename validation and key generation to be methods
* Parse.Error return type no longer required
Copy file name to clipboardExpand all lines: README.md
+17-3Lines changed: 17 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,11 +66,14 @@ The preferred method is to use the default AWS credentials pattern. If no AWS c
66
66
"baseUrlDirect": false, // default value
67
67
"signatureVersion": 'v4', // default value
68
68
"globalCacheControl": null, // default value. Or 'public, max-age=86400' for 24 hrs Cache-Control
69
-
"ServerSideEncryption": 'AES256|aws:kms' //AES256 or aws:kms, or if you do not pass this, encryption won't be done
69
+
"ServerSideEncryption": 'AES256|aws:kms', //AES256 or aws:kms, or if you do not pass this, encryption won't be done
70
+
"validateFilename": null, // Default to parse-server FilesAdapter::validateFilename.
71
+
"generateKey": null // Will default to Parse.FilesController.preserveFileName
70
72
}
71
73
}
72
74
}
73
75
```
76
+
***Note*** By default Parse.FilesController.preserveFileName will prefix all filenames with a random hex code. You will want to disable that if you enable it here or wish to use S3 "directories".
74
77
75
78
### using environment variables
76
79
@@ -109,7 +112,16 @@ var s3Adapter = new S3Adapter('accessKey',
0 commit comments