• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Download a file from a WOHyperlink
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Download a file from a WOHyperlink


  • Subject: Download a file from a WOHyperlink
  • From: David Holt <email@hidden>
  • Date: Mon, 13 Sep 2004 12:46:25 -0700

Hello,

I am trying to create a download link in a WORepetition to individual pdf files that contain the content of each database record.

I can't download the code for how to create a download link to a file in the file system from the page that tells you how to do it! How ironic is that? Can someone please confirm that the "download code" link on the following page doesn't work? I have tried it in Camino and Safari. The file lists as a number and the download dialogue box never displays.

http://wocode.com/cgi-bin/WebObjects/WOCode.woa/1/wa/ShareCodeItem? itemId=271

Assuming that the above file can't be downloaded, is this the correct logic for creating downloadable files:

1. Put all the files in the Web Server resources.
2. Override the appendToResponse method in a download component using the filename for the file. I have the filename in my database, so would I just use the filename variable from my object in a WORepetition? This is Helge's code from that page:


/* Action to call */
WOComponent downloadFileNow() {
DownloadPage page = (DownloadPage) pageWithName( "DownloadPage" );
page.takeValueForKey( data, "dataOfAFile" );
page.takeValueForKey( "NameOfFileAfterItIsSavedToHarddisk", "nameOfAFile" );
return page;
}


I don't understand the reference to the "data" variable. How do I specify the data comes from the file system? Does the file path have to be specified as well? Is there another way to do it by making a link to the WOResourceURL?

Thanks for your help,

David Holt

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Download a file from a WOHyperlink
      • From: Kaj Hejer <email@hidden>
  • Prev by Date: Re: EOSharedEditingContext and ObjectsChangedInStoreNotification
  • Next by Date: Re: Download a file from a WOHyperlink
  • Previous by thread: Re: EOSharedEditingContext and ObjectsChangedInStoreNotification
  • Next by thread: Re: Download a file from a WOHyperlink
  • Index(es):
    • Date
    • Thread