Support Array of ParseFiles#65
Support Array of ParseFiles#65codebreach wants to merge 5 commits intoparse-server-modules:masterfrom
Conversation
…eInDatabase are true
…meInDatabase are true
Current coverage is 13.69% (diff: 4.28%)@@ master #65 diff @@
==========================================
Files 4 4
Lines 263 314 +51
Methods 64 71 +7
Messages 0 0
Branches 77 95 +18
==========================================
+ Hits 41 43 +2
- Misses 222 271 +49
Partials 0 0
|
|
I doubt this will get merged but this works fine in case anyone needs to do some last minute migrations. just two things to keep in mind:
|
flovilmart
left a comment
There was a problem hiding this comment.
Thanks for that feature, it's looking great! A few things to address though!
| return new Promise(function(resolve, reject) { | ||
| async.eachOfLimit(files, asyncLimit, function(file, index, callback) { | ||
| process.stdout.write('Processing '+(index+1)+'/'+files.length+'\r'); | ||
| process.stdout.write('Processing '+(index+1)+'/'+files.length+'\r'); |
| return schemas.get().then(function(res){ | ||
| console.log("Fetching all objects with files..."); | ||
| var schemasWithFiles = onlyFiles(res); | ||
| if (config.onlyFiles){ |
There was a problem hiding this comment.
could we do this feature 'additive' instead of file or array? Like just files, or files + arrays?
| if (config.transferTo === 'filesystem'){ | ||
| var _path = config.filesAdapter._filesDir + "/" + file.newFileName; | ||
| } else if (config.transferTo === 's3'){ | ||
| var _path = "https://" + config.filesAdapter._bucket + "." + config.filesAdapter._s3Client.config.endpoint + "/" + config.filesAdapter._bucketPrefix + file.newFileName; |
There was a problem hiding this comment.
there should be getFileLocation https://github.com/parse-server-modules/parse-server-s3-adapter/blob/master/index.js#L122 available from the S3 adapter, can we use that instead?
|
@flovilmart Thanks for the review Maybe @teehamaral who owns that repo and wrote this code originally can swoop in? |
|
Or you can fork on your repo from the Ilhasoft repo? |
|
@codebreach I could make the changes, but I don't have available time now, maybe we can work together to fix it. |
fixes #35