Sunbird-RC / community

Repo to enable discussions, issue tracking & documentation for the Sunbird-RC projects
MIT License
12 stars 23 forks source link

Update existing template in minio #504

Closed varadeth closed 9 months ago

varadeth commented 1 year ago

Currently, Registry allows to upload template file and keep it in minio. Registry does not have updating the templates. We want to have that feature which supports updating the existing templates

chopadetejaswini commented 1 year ago

Understanding regarding task : I have t create an API for update the template/document/file. It means if name of document is ABC and now i want to change it as XYZ, so when I will hit the API the name should be update in db as a XYZ

implementation Steps as per my understanding: overview the existing API's code Use @putmapping write a code for FileStorageController class write a code for FileStorageService class(updateFiles() code shoul write there)

chopadetejaswini commented 1 year ago

I am trying to update the contents of documents but in minio new file is going to create instead of replace the previous file

chopadetejaswini commented 1 year ago

In putmapping service with the document I am trying to replace the updated file and delete the previous(existing file) but in Postman its showing error. error - Unsupported Media Type and if I tried to do it with documentId then in postman its showing error - Internal server error So now will try to do it using Minio methods like remove_object, stat_object, put_object

chopadetejaswini commented 1 year ago

I have tried to do the task with Minio client methods but its showing error in Postman error - internal server error

chopadetejaswini commented 1 year ago

Task completed, file is updating on Minio server

srprasanna commented 10 months ago

@holashchand please review and close.

holashchand commented 9 months ago

PR https://github.com/Sunbird-RC/sunbird-rc-core/pull/275