Hi ,
I got a chance to run the App Rick provided and go into the
depth of it.Here are my findings
a) The Problem is not dev console. When you change the
configuration of a file group using dev console it actually change
the configuration , its just that the UI is not updated which has
been already fixed and will be updated in next drop.
b) The reason Rick's example don't work is because of not
using the token value in navigateToUrl. If you look at the
FileSubscriber's download function it appends url+filename+token to
send the URLRequest. The way server verifies is if you are an Owner
, it will let you go through otherwise you need to have the token
with you(see in download function of FileSubsriber.as how we create
the token).
c) Even if you pass the complete url i.e. url+filename +token
, still navigateToUrl function has some issues for guests , we are
investigating that. However, you can get the downloaded file like
image(or any file uploaded) using any Image class or the loader
since you have the correct URL. I will copy the rick's updated
example with the changes you need to make which runs for the image
case.
For the next release which will be coming in some weeks, we
plan to give users a new parameter in FileDescriptor class that has
the entire Url , so that you don't have to do the concatenation
work urself. We will also try to get this navigateToUrl issue
resolved for guests.
Here are couple of things you can do now, if you are using
the FileSubscriber and FilePublisher instead of the FileShare Pod
itself, just call the fileSubscriber.download function. However, if
you are using FileShare as in rick's example, you will have to do
concatenation with token and use loader class(or image if its an
image) to get the file.
I am attaching the rick's code with this reply that will make
things more clear. One more info, if you are creating FileShare pod
in code, the node that gets created is default_FileSharePod which
is the default sharedID of FileShare. So, its best always to have
fileShare a sharedID when you create it ( as in my attached code)
and call subscribe on it as a best practice.
Please let me know if there are issues.
Thanks
Regards
Hironmay Basu
Attached is the rick's code for guest with my changes