How do I allow users to upload images to my site by clicking the Upload button. ? I'm using python S

Options
samy440
samy440 Member Posts: 1
edited November 2023 in Developer APIs

How do I allow users to upload images to my site by clicking the Upload button. ? I'm using python SDK. I'm working on a Django project. And when we click on download, it doesn't work. The browser returns an error message: "file not available on this site". How to fix this problem ?

Tagged:

Answers

  • Wissam
    Wissam Member, Cloudinary Staff Posts: 71
    Options

    Hi There,

    To allow users to upload images to your site using Cloudinary SDK, you can follow the steps outlined in this tutorial. It provides a detailed guide on how to save images in Django using Cloudinary.

    Here’s a brief summary of the steps:

    1. Create a new virtual environment and install Django.
    2. Create a new Django project and app.
    3. Add the app to the list of installed apps.
    4. Create a Cloudinary account and install the Cloudinary module in your project.
    5. Configure Cloudinary in your project by adding it to the list of installed apps.
    6. Create a model class with an image field of the CloudinaryField class.
    7. Create a view function that handles image uploads.
    8. Add a URL pattern for the view function.

    Regarding the issue you’re facing with downloading files, it’s difficult to determine the root cause without more information. However, one possible reason could be that the file is not available on the server or there is an issue with the file path. You can try checking if the file exists on the server and ensure that the file path is correct.

    I hope this helps!

    Regards,

    Wissam