Coder Social home page Coder Social logo

Comments (2)

tvb avatar tvb commented on August 24, 2024

@gocom Any idea when to implement this?

from danpu.

gocom avatar gocom commented on August 24, 2024

@tristanvanbokkem Might not happen at all, actually. There is nothing wrong in how Danpu manages temporary files and does it well.

This is mainly only about moving the functionality to an external library (or using a library) and also about using temporary files the compression task, rather than streaming the file to final location. The latter would only improve things if the file and temporary location are on same volume, otherwise we still need to use copy instead of rename, resulting into the same situation.

The first point, in OP, about temporary directory location is not true. Danpu uses tempnam(), and it uses PHP's default temporary directory as a fallback. Well, it tries. Doing our own searching function is not feasible and may cause security issues since we can not know where you want to your files be put.

Unfortunately, there are no good libraries available for handling temporary files and atomic file operations do not exist in PHP. If the library can not be made atomic and completely error-aware, there is no point in writing one.

The only planned change is using temporary file for the compression task, and it will happen at some point. Due to the physical volume 'limitation' it's somewhat low priority.

from danpu.

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.