URL into FolderItem

  1. 10 months ago

    Marcel Z

    6 Dec 2017 Pre-Release Testers, Xojo Pro Kirn, RP, Germany.
    Edited 10 months ago

    I have a PDF file on a web server, which I would like to open with a FolderItem.

    I tried several ways, I thought this is best solution, but it doesn't work.

    dim InputFile as FolderItem  
    InputFile.URLPath = "http://url.com/druckvorlagen/druckvorlage_formular_04.pdf"

    How can I use a FolderItem to open a pdf from an URL?

    i solved it with a normal FolderItem, and saving the xojo webapp to the same webserver with the .pdf .

  2. Tim P

    6 Dec 2017 Pre-Release Testers feedback://46303
    Edited 10 months ago

    Are you on the Web Framework or the Desktop Framework?
    On the Web Framework you won't be able to FolderItem.Launch anything. If you're on the Desktop Framework, you'll need to download the PDF to Application Support or Temporary before trying to launch it.

    Edit: Yes, I see the post is in the Web category, but the question wasn't entirely clear.

  3. Greg O

    6 Dec 2017 Xojo Inc Somewhere near Raleigh, NC

    @Marcel Z I have a PDF file on a web server, which I would like to open with a FolderItem.

    I tried several ways, I thought this is best solution, but it doesn't work.

    dim InputFile as FolderItem  
    InputFile.URLPath = "http://url.com/druckvorlagen/druckvorlage_formular_04.pdf"

    How can I use a FolderItem to open a pdf from an URL?

    Not directly. You could use an HTTPSocket to download it to a folderitem, but that’s rather indirect.

    You really should use shellpath or NativePath.

  4. Marcel Z

    6 Dec 2017 Pre-Release Testers, Xojo Pro Kirn, RP, Germany.

    I'm using the WebEdition [2017.3]

    NativePath is difficult because the Xojo -App is not on the same server with the .pdf .

  5. Greg O

    7 Dec 2017 Xojo Inc Somewhere near Raleigh, NC

    Then you’ll have to use HTTPSocket or HTTPSecureSocket. Folderitem.url doesn’t do what you want.

  6. 9 months ago

    Marcel Z

    9 Dec 2017 Pre-Release Testers, Xojo Pro Answer Kirn, RP, Germany.

    i solved it with a normal FolderItem, and saving the xojo webapp to the same webserver with the .pdf .

or Sign Up to reply!