Where to Save Downloads -- Best Practice?

Sivakatirswami 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 
Support"
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" 
directories
for each platform.



Luis wrote:
> 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?
> 
> Cheers,
> 
> Luis.
> 
> 
> 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
>> ../Podcast.app/Contents/MacOS/Latest_Podcast.mp3
>> Fortunately the player in Rev has no problem with this path:
>> ~/Desktop/Podcast.app/Contents/MacOS/Latest_Podcast.mp3
>>
>> 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!
>>
>> TIA
>>
>> Sivakatirswami
>> www.himalayanacademy.com
>>
>> Get Hinduism Today Digital Edition. It's Free!
>> http://www.hinduismtoday.com/digital/
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your 
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 

-- 
Om shanti
(In  Peace)

Sivakatirswami
www.himalayanacademy.com

Get Hinduism Today Digital Edition. It's Free!
http://www.hinduismtoday.com/digital/



More information about the use-livecode mailing list