Giter Club home page Giter Club logo

Comments (2)

gweis avatar gweis commented on June 30, 2024

Hi,

I recently ran into this as well. The file is removed, because the ZODB
Blob implementation detects, that the file exists on the same file system,
and moves it.

It is a bit of a surprising behaviour, but I am not sure whether this
should be fixed in The NamedFile field or in documentation.

On 04/09/2013, at 2:07 AM, "Jens W. Klein" [email protected] wrote:

I have really no good idea why this happens. But I refactored the tests so
plone.namedfile.file.NamedBlobFile gets an open file to consume the data
from. The tests are working, except that the file is deleted after
NamedFile read from a file thats opened in mode 'r' for read. So running
the test a second time will fail. Therefore I added a check at the very end
of the test to check if the file exists.

I would be happy if someone with deeper insight on plone.namedfile looks at
it, so this is really odd behavior. I fear its only a side effect and the
real bug is somehwere else and not in p.a.c - but since it starts here I
report here.

I added the scenario to the tests - including a comment - here.

https://github.com/plone/plone.app.contenttypes/blob/master/plone/app/contenttypes/tests/test_indexes.py#L206


Reply to this email directly or view it on
GitHubhttps://github.com//issues/57
.

from plone.app.contenttypes.

jensens avatar jensens commented on June 30, 2024

Ok, thats really surprising. At least some documentation is needed, not here but in plone.namedfile api docs.

So the test should create a tempfile to be consumed. OTOH, if we drop this test, the other two cases should cover the indexing case anyway.

from plone.app.contenttypes.

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.