Code Monkey home page Code Monkey logo

Comments (4)

abaldwin99 avatar abaldwin99 commented on July 20, 2024

The function get_upload_params under s3direct/views.py has a variable called filename. You should be able to add standard Django DB Querysets into the function that will add the filename variable's value into the database with each upload.

from django-s3direct.

bradleyg avatar bradleyg commented on July 20, 2024

Although it's not possible to save the old name (without doing what @blah73 suggested) as a compromise you could pass a function to the "path" attribute rather than an actual path that generates a unique ID and appends it to the original file name. Take a look in the example app for passing a function to the path attribute.

from django-s3direct.

celiao avatar celiao commented on July 20, 2024

That's exactly how I addressed the issue. Thanks for the confirmation that
I'm on the right track.

On Sat, Sep 6, 2014 at 7:06 AM, Bradley Griffiths [email protected]
wrote:

Closed #20 #20.


Reply to this email directly or view it on GitHub
#20 (comment).

from django-s3direct.

invalid-access avatar invalid-access commented on July 20, 2024

I don't know if this was resolved, but I solved it by storing a json-ized dict in the base TextField. The dict currently contains the destination file URL as before, and also the original filename.
Commit

Pl consider merging if this is a good way to accomplish this.

from django-s3direct.

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.