cozy / cozy-client-js

Javascript library to write Cozy applications
https://docs.cozy.io/en/cozy-client-js/README/
MIT License
11 stars 12 forks source link

feat: allow to define any file metadata on file upload #292

Closed doubleface closed 5 years ago

doubleface commented 5 years ago

This follows api defined in https://github.com/cozy/cozy-stack/pull/1929. Metadata is created in io.cozy.files.metadata, and metadata id is referenced in file creation options.

doubleface commented 5 years ago

@nono I did the fixes after your comments. Are you ok now ?

doubleface commented 5 years ago

@edas @nono @y-lohse I removed the use of querystring which is a node internal module and I saw that cozy-drive uses cozy-client-js for some features.

I tested it with a connector in 'int' environment an I can see the metadata in io.cozy.files.

edas commented 5 years ago

Also, shouldn't we put /dist in gitignore ?

doubleface commented 5 years ago

@edas I was not part of this decision to keep the dist directory in git. But since now travis builds this directory itself before publishing, I suppose we could remove it. But this should not be part of this PR.