Giter VIP home page Giter VIP logo

Comments (7)

mrzapp avatar mrzapp commented on June 15, 2024

Sounds like a good addition, the documentation for writing files is here, you may be able to find something useful.

from cookbook.

mrzapp avatar mrzapp commented on June 15, 2024

@Luticus I can't find anything on the topic here: https://docs.nextcloud.com/server/latest/developer_manual/search.html?q=revision&check_keywords=yes&area=default

Are you aware of any other words that describe this feature?

from cookbook.

Luticus avatar Luticus commented on June 15, 2024

Maybe try: https://docs.nextcloud.com/server/latest/developer_manual/client_apis/WebDAV/versions.html?highlight=files%20versions

I'm definitely not a Nextcloud app developer but that's my best guess.

from cookbook.

Teifun2 avatar Teifun2 commented on June 15, 2024

Is it possible to edit an entry instead of deleting and adding it when they get updated?

Currently when a entry is updated the file gets deleted and written. I'm not surprised that nextcloud cannot keep revisions of such behavior.

from cookbook.

mrzapp avatar mrzapp commented on June 15, 2024

@Teifun2 Aha, you've got a point. The change would be in the lib/Service/RecipeService::updateRecipe method

from cookbook.

Teifun2 avatar Teifun2 commented on June 15, 2024

I looked into it a little further and i noticed that the RecipeService::addRecipe already has the capabilities to deal with an "existing" Recipe.

To me it seems we could just remove the delete statement and the files should be updated instead of replaced.
I tried it on my local instance and it worked but my testing was rather minor. The File had a revision and there was no duplication just by removing the line with $this->service->deleteRecipe($id);.

It would be greate if somone else could test that, because i'm unsure if i understand all the implications that might have. @mrzapp

from cookbook.

mrzapp avatar mrzapp commented on June 15, 2024

@Teifun2 that's our culprit! The reason for that delete statement was so we could clear the image cache, which no longer works as it used to, so the delete statement is redundant.

Feel free to make the change and merge it into develop. I will test all issues afterwards and push a new release.

from cookbook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.