tamakisquare
tamakisquare

Reputation: 17077

Django - Preview uploaded picture prior to deciding to save

Like the title suggested, I want to implement a two-steps picture uploading mechanism.

  1. User selects a picture to upload and click on "Upload". Once the server receives the request that contains the picture, it would save the picture in a temporary location, on disk or memory, and the resize it to a standard size, if needed. The server then renders a new response for the user to preview the uploaded picture.
  2. After previewing the picture, the user needs to click on "Save" to confirm for the server. The server then moves the picture from the temporary location to a permanent one and updates the corresponding entry in the DB.

What's a good way to implement this? What are some of the apps out there that might be able to help me? Thanks.

Upvotes: 0

Views: 981

Answers (1)

Zach Kelling
Zach Kelling

Reputation: 53839

I would suggest either rolling your own (you might find it surprisingly easy, start with reading the docs on forms) or customizing django-photologue or django-filebrowser.

Upvotes: 1

Related Questions