Where to Save Downloads -- Best Practice?
katir at hindu.org
Thu Oct 12 20:24:51 CDT 2006
Well the original stack will be a standalone,
I have to assume the user could put this anywhere.
If we deliver it a a zipfile, each user will have a different
"style" of what they will do with the executable
after they decompress it... I can't now for sure where it will be.
If we use a professional windows installer or Mac installer
the user is prompted to store executables in their applications
folder. I'm worried then that " put the filename of this stack into tPath "
will give us path to a directory which cannot be written to.
In so far as users can move their applications and run them from anywhere.
I'm guessing now that " put the filename of this stack into tPath "
is a bad strategy and could easily break:
put url gURL into url ("binfile:" & tPath)
So, what should one do? I guess the options are to use "Application
On the Mac and some such similar special directory on Windows.
If I'm right, then what is it?
What we need is the standard, "for-sure-to-work"
location for saving the file to, such that it can be
successfully written, immediately, by script control
without prompting the user to pick a directory and name the file.
i.e. the default "guaranteed for-sure-exists and is read -- write"
for each platform.
> Where does the downloaded file appear in on the Windows boxes?
> I mean: Is it consistently in the same place? What does your 'tPath'
> point to?
> May it be relying on the default IE download location?
> Sivakatirswami wrote:
>> I have a Podcast App dedicated to a single feed.
>> to avoid issues with the player playing streaming
>> remote URL's (which is not working on many windows
>> machines)I used a download, save and play model,
>> as we know that playing media from the local hard
>> drive is quite solid.
>> But, now a new problem arises, some windows users
>> are complaining that the podcast appears to be
>> downloaded but can't be played. My script is simple
>> and works on the Mac where the downloaded file
>> ends up inside (unexpectedly) in the package contents
>> of the standalone on OSX...
>> Where, btw, Spotlight and Mac Finder "Find"
>> are unable to find it....causing me to be perplexed because
>> the download appeared fine, the audio played but I could
>> not find the file! the path returned by the filename
>> of this stack goes all the way down into
>> Fortunately the player in Rev has no problem with this path:
>> But, things are not happy on Windows:
>> # lots of download progress
>> # stuff goes on here:
>> # then:
>> ON saveURL gURL
>> put the filename of this stack into tPath
>> set the itemdel to "/"
>> put "Lastest_Podcast.mp3" into item -1 of tPath
>> put url gURL into url ("binfile:" & tPath)
>> unload url gURL
>> runPodcast tPath
>> END saveURL
>> ON RunPodcast pPath
>> set the cursor to arrow
>> show player "player1" --with visual effect dissolve
>> set the filename of player "player1" to pPath
>> start player "player1"
>> set the itemdel to ":"
>> put item 1 of tDuration && "min. " & item 2 of tDuration &&
>> "sec." into tLength
>> showstatus ("Title:" & cr &cr & tTitle & cr & cr & tLength),15
>> show image "Gurudeva" with visual dissolve slowly
>> END runPodCast
>> Again, same old issue: This works fine on our old Del Running XP..
>> So, my in-house tests indicate "Looking Good on Windows--
>> OK to Ship...."
>> Then now I get a report from a Windows user
>> "It downloads but it will not play... " On this same user's
>> machine they use another application I deploy which plays sound
>> files in Revolution, but they save the files manually to some other
>> directory on their box. So, I'm thinking there is a problem with
>> writing to a protected directory? Or does can windows be set to block
>> saving a file that was just downloaded via http?
>> So, I'm guessing now that saving a downloaded cached URL
>> to the same directory as the standalone, may not be good practice.
>> Windows Wizards, please advise!
>> Get Hinduism Today Digital Edition. It's Free!
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
Get Hinduism Today Digital Edition. It's Free!
More information about the use-livecode