Reputation: 3560
I need to upload file into some folder inside the project using the path instead of browse from folder using Django and Python. Here is my code:
<form method="post" action="{% url 'upload' %}">
<input name="name" type="text">
<button type="submit">Upload</button>
</form>
Suppose here user paste one file path name e.g-/home/subrajyoti/Pictures/abc.pdf,.png etc
and click on upload button in this case I need to remove the original file name with one time stamp and save this file into project folder and path into db.
Upvotes: 0
Views: 49
Reputation: 4208
I don't think browsers allow you to access file system with a path. The only way browsers allow you to access file system is by "Choose a file" from browser.
This is for security reasons to protect users.
Upvotes: 1