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
* Switch from fileKey to encryptionKey
* remove old notice
* add default file location info and tests
* add Dangefile to see if it reduces error
* remove Dangerfile
* add getFileLocation test
* add missing testcase
"fileKey":"someKey"//optional, but mandatory if you want to encrypt files
27
+
"filesSubDirectory":"my/files/folder", // optional, defaults to ./files
28
+
"encryptionKey":"someKey"//optional, but mandatory if you want to encrypt files
29
29
}
30
30
}
31
31
}
32
32
```
33
33
34
34
### Passing as an instance
35
-
***Notice: If used with parse-server versions <= 4.2.0, DO NOT PASS in `PARSE_SERVER_FILE_KEY` or `fileKey` from parse-server. Instead pass your key directly to `FSFilesAdapter` using your own environment variable or hardcoding the string. parse-server versions > 4.2.0 can pass in `PARSE_SERVER_FILE_KEY` or `fileKey`.***
36
35
37
36
```javascript
38
37
var FSFilesAdapter =require('@parse/fs-files-adapter');
"fileKey":"someKey"//optional, but mandatory if you want to encrypt files
40
+
"filesSubDirectory":"my/files/folder", // optional, defaults to ./files
41
+
"encryptionKey":"someKey"//optional, but mandatory if you want to encrypt files
43
42
});
44
43
45
44
var api =newParseServer({
@@ -49,16 +48,16 @@ var api = new ParseServer({
49
48
})
50
49
```
51
50
52
-
### Rotating to a new fileKey
53
-
Periodically you may want to rotate your fileKey for security reasons. When this is the case, you can start up a development parse-server that has the same configuration as your production server. In the development server, initialize the file adapter with the new key and do the following in your `index.js`:
51
+
### Rotating to a new encryptionKey
52
+
Periodically you may want to rotate your encryptionKey for security reasons. When this is the case, you can start up a development parse-server that has the same configuration as your production server. In the development server, initialize the file adapter with the new key and do the following in your `index.js`:
54
53
55
54
#### Files were previously unencrypted and you want to encrypt
56
55
```javascript
57
56
var FSFilesAdapter =require('@parse/fs-files-adapter');
console.log('Files rotated to newKey:' + rotated);
86
85
console.log('Files that couldn't be rotated to newKey: '+ notRotated);
87
86
```
88
87
89
88
#### Only rotate a select list of files that were previously encrypted with `oldKey` and you want to encrypt with `newKey`
90
-
This is useful if for some reason there errors and some of the files werent rotated and returned in `notRotated`. The same process as above, but pass in your `oldKey` along with the array of `fileNames` to `rotateFileKey()`.
89
+
This is useful if for some reason there errors and some of the files werent rotated and returned in `notRotated`. The same process as above, but pass in your `oldKey` along with the array of `fileNames` to `rotateEncryptionKey()`.
91
90
```javascript
92
91
//This can take awhile depending on how many files and how larger they are. It will attempt to rotate the key of all files in your filesSubDirectory
0 commit comments