Upload Pictures to WebApp

  1. 2 years ago

    Tony L

    5 Apr 2017 Pre-Release Testers, Xojo Pro Hong Kong

    Hi All,

    I tried with a simple web app that can upload and save files to my Firebird database BLOB column. I have a few questions now:

    1. Is it possible to add more than one files at a time in the WebFileUploader (the + button)?
    2. Can I drag from Windows desktop and drop pictures to the WebFileUploader directly?
    3. If answer to Q2 is negative, can I add files to WebFileUploader by code? I want to let use to drop files in a textarea (or weblist if possible), then I can add the files to the Uploader by code.
    4. WebControl.AcceptPictureDrop requires a parameter ( acceptedActions As Integer ), what is acceptedActions?
    5. By doing nothing, if the user drag a file to my webapp, the web app change its page and show the file, how can I disable this?

    Thanks a lot.

  2. Albin K

    9 Apr 2017 Europe (Sweden)
    Edited 2 years ago
    1. Yes.
    2. No.
    3. No. That would require the app to have access to a computer that isn't even hosting the app itself.
    4. -
    5. I think this is standard behavior of a browser. Maybe it can be changed by JavaScript?

    http://docs.xojo.com/index.php/WebFileUploader

  3. Michel B

    10 Apr 2017 Pre-Release Testers RubberViews.com

    @Albin K 5. I think this is standard behavior of a browser. Maybe it can be changed by JavaScript?

    There was a discussion three years ago :
    https://forum.xojo.com/11140-htmlviewer-file-drop/0

  4. Tony L

    10 Apr 2017 Pre-Release Testers, Xojo Pro Hong Kong

    Does it mean things has to be done in all pages and dialog?

    BTW, I think jQueryFileUpload of Web Custom Controls can help me in the file upload issue, will have it a try later.

  5. Michel B

    10 Apr 2017 Pre-Release Testers RubberViews.com
    Edited 2 years ago

    Ouch. I just tried to download Shao Sean's example project, and the link is no longer valid. Unfortunately, I have not kept a copy. Sorry.

    This seems to address the issue :
    http://stackoverflow.com/questions/6756583/prevent-browser-from-loading-a-drag-and-dropped-file#6756680

    And, yes, it would have to be added to each WebPage. I don't think that would be necessary for dialogs. The listener should block drop files for the whole WebPage, including dialogs. But you may want to experiment.

  6. 10 months ago

    Tim S

    24 Jun 2018 Pre-Release Testers, Xojo Pro Phoenix Arizona USA

    Hello.
    Is there a current sample for this in 2018R1.1? I did not see one...
    Tim

  7. 4 months ago

    Is it possible to add more than one files at a time in the WebFileUploader (the + button)? How ?

  8. Paul L

    Jan 7 Xojo Inc http://docs.xojo.com

    @xiaoxia n Is it possible to add more than one files at a time in the WebFileUploader (the + button)? How ?

    Yes. Set the WebFileUploader.MultiSelect property to True.

    https://docs.xojo.com/WebFileUploader.MultiSelect

  9. Jay M

    Jan 7 Pre-Release Testers, Xojo Pro Austin TX

    Can I drag from Windows desktop and drop pictures to the WebFileUploader directly? --> No?????

  10. Tim P

    Jan 7 Pre-Release Testers Austin, TX
    Edited 4 months ago

    @Jay M Can I drag from Windows desktop and drop pictures to the WebFileUploader directly? --> No?????

    Issues with Xojo Web are browser specific. Drag and drop is working here on macOS 10.14.2 and Firefox. When having issues with Xojo Web it is essential to let them know which web browser and OS you are using when you file a bug report :)

  11. Paul L

    Jan 7 Xojo Inc http://docs.xojo.com

    @Jay M Can I drag from Windows desktop and drop pictures to the WebFileUploader directly? --> No?????

    Starting with 2018r1, you can drag and drop files onto the WebFileUploader control to add them to the list.

    https://docs.xojo.com/WebFileUploader

    Works for me with Chrome on Windows.

  12. Lars L

    Jan 8 Pre-Release Testers, Xojo Pro Europe (Germany, Chemnitz)

    Its not possible using the standard uploader.

    but! you can "easily" write your own Upload-Control, which loads the file to your server after the drop. Done several times on the Internet. What you have to do in xojo is, that your control receives the native paths of the uploaded files.

    I think I've seen this before also implemented in xojo, maybe in Jeremy Leroy control library.

or Sign Up to reply!