Yii Framework Forum: How to drop a file? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to drop a file? Rate Topic: -----

#1 User is offline   realtebo 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 837
  • Joined: 03-October 12
  • Location:Ferrara

Posted 16 May 2017 - 01:42 AM

I'd like to allow user to Drop files from his/her desktop into a form, to force a create an auto-upload function.

I tryied to add a droppable class to a div, and then to detect some events, like activate, but when dropping file from the desktop, the browser force a download of the same file (!!!?!!?!) instead of fire the jquery-ui events of 'droppable' component.
Il computer non ragiona, ma ha sempre ragione.
Ricordalo quando fai il debug
0

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,228
  • Joined: 17-January 09
  • Location:Russia

Posted 17 May 2017 - 03:46 AM

Are you using jQueryUI? Overall you need to use JavaScript file API.
Yii 2.0 Development Cookbook

Enjoying Yii? Star us at github

Support me so I can work more on Yii: https://www.patreon.com/samdark
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users