1

I have an edit page where the image would already be present after the creation of a "content" - before editing. The problem is that when i try to pass the select "name of the file passed using foreach, fetched from the database" file without uploading anything to the controller the value of the image disappears.

Needed solution: is there a way to automatically choose an image from a folder when the page loads. Simplified - i need an AJAX or JS to choose a file in the form without clicking the choose file when the page is loaded.

TMNT
  • 156
  • 1
  • 10
  • 1
    You can store user selected image at `localStorage` or `LocalFileSystem` at chrome, chromium. See [Global Variable usage on page reload](http://stackoverflow.com/questions/29986657/global-variable-usage-on-page-reload/). You could also utilize `ServiceWorker` to achieve requirement. – guest271314 Feb 09 '17 at 05:59
  • in this problem the user does not have to select anything. i need an automatic function that can automatically select an image from a folder provided the image path and name – TMNT Feb 09 '17 at 06:04
  • 1
    How is image path retrieved? You cannot select file from user filesystem without user action. – guest271314 Feb 09 '17 at 06:08

0 Answers0