URL into FolderItem

  1. last week

    Marcel Z

    Dec 6 Kirn, RP, Germany.
    Edited last week

    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

    Dec 6 Pre-Release Testers, Xojo Pro
    Edited last week

    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

    Dec 6 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

    Dec 6 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. 7 days ago

    Greg O

    Dec 7 Xojo Inc Somewhere near Raleigh, NC

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

  6. 4 days ago

    Marcel Z

    Dec 9 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!