Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata tags #1070

Merged
merged 53 commits into from
Mar 29, 2020
Merged

Metadata tags #1070

merged 53 commits into from
Mar 29, 2020

Conversation

stevestencil
Copy link
Contributor

No description provided.

stevestencil and others added 30 commits August 8, 2019 11:03
Add support to add hint to Parse.Query (parse-community#1054)
@dplewis
Copy link
Member

dplewis commented Jan 22, 2020

Yes but you are forgetting about fs.chunk and fs.files

https://docs.mongodb.com/manual/core/gridfs/

{
  "_id" : <ObjectId>,
  "length" : <num>,
  "chunkSize" : <num>,
  "uploadDate" : <timestamp>,
  "md5" : <hash>,
  "filename" : <string>,
  "contentType" : <string>,
  "aliases" : <string array>,
  "metadata" : <any>, // 
}

https://mongodb.github.io/node-mongodb-native/3.2/api/GridFSBucket.html#openUploadStream

In node you just add an option to bucket.openUploadStream('fileName', { metadata }); and retrieve it in a similar way.

I've already tried in the the last metadata PR.

@stevestencil
Copy link
Contributor Author

interesting... at first glance, does this mean files would be stored in the database and not S3?

@dplewis
Copy link
Member

dplewis commented Jan 22, 2020

I'm sorry by saving and retrieving metadata on MongoDB I mean saving and retrieving metadata on GridFS and GridStore the default storage adapter.

@stevestencil
Copy link
Contributor Author

So the changes I have in this PR is to get the metadata and tags from the client to the server... the reason I had to convert to base64 is because it was being sent directly through the ajax function as a Buffer of data. There was no way to add additional data to be sent with it. Do you have another suggestion to do this?

@stevestencil stevestencil force-pushed the metadata-tags branch 2 times, most recently from 2b83cf1 to 8496b7c Compare January 26, 2020 14:42
@stevestencil
Copy link
Contributor Author

@dplewis are there any changes needed for this PR?

@dplewis
Copy link
Member

dplewis commented Mar 6, 2020

@stevestencil Sorry for the late reply. I have to add a PR to the server repo in order to add test cases for this.

Copy link
Member

@dplewis dplewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments. I think the build was failing also.

Everything looks good so far

src/ParseFile.js Outdated Show resolved Hide resolved
@dplewis
Copy link
Member

dplewis commented Mar 27, 2020

@stevestencil I can have a look at the unit tests if you want.

@stevestencil
Copy link
Contributor Author

@dplewis Feel free! I've been trying to get around to this all week but I have been slammed with work

Copy link
Member

@dplewis dplewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I’m going to push a release now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants