Implementing HTML5 drag+drop uploader

I'm looking to implement an HTML5 drag+drop uploader into our frappe system, and I'm having some trouble getting the data passed from the client to server. I created an endpoint at /api/method/dotted.path.to.upload and then tried pointing a plugin like https://github.com/weixiyen/jquery-filedrop to the previous url. However, I'm unable to recover the file in my python function (stub located here: https://gist.github.com/bkiu/0148798241fafa10e312)

I looked at frappe.upload.make, but it uses a dialog instead of allowing for the use of drag and drop. Is there a way I can retrieve the data file from my custom API function?

Thanks.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/786ac226-dda0-47e0-9342-6ff19a45ce6d%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.

On 23-Aug-2014, at 2:29 pm, Brendan Kiu <br...@gmail.com> wrote:

I'm looking to implement an HTML5 drag+drop uploader into our frappe system, and I'm having some trouble getting the data passed from the client to server. I created an endpoint at /api/method/dotted.path.to.upload and then tried pointing a plugin like https://github.com/weixiyen/jquery-filedrop to the previous url. However, I'm unable to recover the file in my python function (stub located here: https://gist.github.com/bkiu/0148798241fafa10e312)

I looked at frappe.upload.make, but it uses a dialog instead of allowing for the use of drag and drop. Is there a way I can retrieve the data file from my custom API function?

Why don't you fork your code and send a pull-request, really hard to explain this way.


Thanks.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/786ac226-dda0-47e0-9342-6ff19a45ce6d%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/446FDAB2-1839-4DC0-985A-0F14E5B1A745%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
I'm on a private repo for work, but I've copied the code and made a new repo here: https://github.com/bkiu/school_management with the code in question. Let me know if that will work.

On Saturday, August 23, 2014 2:55:54 PM UTC+5:30, rushabh wrote:

On 23-Aug-2014, at 2:29 pm, Brendan Kiu <br...@gmail.com> wrote:

I'm looking to implement an HTML5 drag+drop uploader into our frappe system, and I'm having some trouble getting the data passed from the client to server. I created an endpoint at /api/method/dotted.path.to.upload and then tried pointing a plugin like https://github.com/weixiyen/jquery-filedrop to the previous url. However, I'm unable to recover the file in my python function (stub located here: https://gist.github.com/bkiu/0148798241fafa10e312)

I looked at frappe.upload.make, but it uses a dialog instead of allowing for the use of drag and drop. Is there a way I can retrieve the data file from my custom API function?

Why don't you fork your code and send a pull-request, really hard to explain this way.


Thanks.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/786ac226-dda0-47e0-9342-6ff19a45ce6d%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/a34f819f-086d-4f51-a9f1-b26c5fa50268%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Brendan,

Why don't you buy developer support? Or make your project Open Source.

http://frappe.io/buy/

I hope you understand our lack of incentive for helping out on projects that wont contribute back to the community.

best,
Rushabh



@rushabh_mehta

On 23-Aug-2014, at 3:39 pm, Brendan Kiu <br...@gmail.com> wrote:

I'm on a private repo for work, but I've copied the code and made a new repo here: https://github.com/bkiu/school_management with the code in question. Let me know if that will work.

On Saturday, August 23, 2014 2:55:54 PM UTC+5:30, rushabh wrote:

On 23-Aug-2014, at 2:29 pm, Brendan Kiu <br...@gmail.com> wrote:

I'm looking to implement an HTML5 drag+drop uploader into our frappe system, and I'm having some trouble getting the data passed from the client to server. I created an endpoint at /api/method/dotted.path.to.upload and then tried pointing a plugin like https://github.com/weixiyen/jquery-filedrop to the previous url. However, I'm unable to recover the file in my python function (stub located here: https://gist.github.com/bkiu/0148798241fafa10e312)

I looked at frappe.upload.make, but it uses a dialog instead of allowing for the use of drag and drop. Is there a way I can retrieve the data file from my custom API function?

Why don't you fork your code and send a pull-request, really hard to explain this way.


Thanks.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/786ac226-dda0-47e0-9342-6ff19a45ce6d%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.




Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/a34f819f-086d-4f51-a9f1-b26c5fa50268%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/5BE9A40B-71D9-4160-B094-417E5C51433B%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.