MivaScript.com contains this document describing how to upload a file to a server. http://www.mivascript.com/topic/file-uploading.html
I wrote a module to duplicate the process used in the admin when you click one of the [upload] buttons. (e.g. image uploading) A popup opens that provides a File Upload dialog which uses the <input type="file"> form field to post to my module which handles the actual upload process. Once the upload is complete JavaScript passes the filename back to the calling form and closes the popup.
My difficulty is using this process with mobile devices and/or with browsers that block popups.
Here is what I have. I have contact form where I have currently have a button that triggers a popup (see image below) and works just like Miva Admin. The popup has its own form that gets posted and
Here is what I want. Provide a browse and upload button without the popup that triggers some ajax process and then returns the filename that I embed into the form along with an image thumbnail. I seem to have a mental block and can't see through how to make this work.
Something like the Miva Forum process for uploading images would be great.
Also what security concerns do I need to address?
Any guidance would be appreciated.
I wrote a module to duplicate the process used in the admin when you click one of the [upload] buttons. (e.g. image uploading) A popup opens that provides a File Upload dialog which uses the <input type="file"> form field to post to my module which handles the actual upload process. Once the upload is complete JavaScript passes the filename back to the calling form and closes the popup.
My difficulty is using this process with mobile devices and/or with browsers that block popups.
Here is what I have. I have contact form where I have currently have a button that triggers a popup (see image below) and works just like Miva Admin. The popup has its own form that gets posted and
Here is what I want. Provide a browse and upload button without the popup that triggers some ajax process and then returns the filename that I embed into the form along with an image thumbnail. I seem to have a mental block and can't see through how to make this work.
Something like the Miva Forum process for uploading images would be great.
Also what security concerns do I need to address?
Any guidance would be appreciated.
Comment