Option to ignore parse file storage (#2222)
* flag in configurations to use only files adapter * added lib folder * remove lib * alignment edit * replace comma with semicolon * ignore parse file storage if fileKey is not provided (undefined)
This commit is contained in:
@@ -64,12 +64,16 @@ export class FilesController extends AdaptableController {
|
||||
// all filenames starting with "tfss-" should be from files.parsetfss.com
|
||||
// all filenames starting with a "-" seperated UUID should be from files.parse.com
|
||||
// all other filenames have been migrated or created from Parse Server
|
||||
if (filename.indexOf('tfss-') === 0) {
|
||||
fileObject['url'] = 'http://files.parsetfss.com/' + config.fileKey + '/' + encodeURIComponent(filename);
|
||||
} else if (legacyFilesRegex.test(filename)) {
|
||||
fileObject['url'] = 'http://files.parse.com/' + config.fileKey + '/' + encodeURIComponent(filename);
|
||||
} else {
|
||||
if (config.fileKey === undefined) {
|
||||
fileObject['url'] = this.adapter.getFileLocation(config, filename);
|
||||
} else {
|
||||
if (filename.indexOf('tfss-') === 0) {
|
||||
fileObject['url'] = 'http://files.parsetfss.com/' + config.fileKey + '/' + encodeURIComponent(filename);
|
||||
} else if (legacyFilesRegex.test(filename)) {
|
||||
fileObject['url'] = 'http://files.parse.com/' + config.fileKey + '/' + encodeURIComponent(filename);
|
||||
} else {
|
||||
fileObject['url'] = this.adapter.getFileLocation(config, filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ class ParseServer {
|
||||
dotNetKey,
|
||||
restAPIKey,
|
||||
webhookKey,
|
||||
fileKey = 'invalid-file-key',
|
||||
fileKey = undefined,
|
||||
facebookAppIds = [],
|
||||
enableAnonymousUsers = true,
|
||||
allowClientClassCreation = true,
|
||||
|
||||
Reference in New Issue
Block a user