Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Guest can't load shared files...

Erick_G_
Level 1
Level 1
... from a AIR HTML component in a AFCS connected AIR app.

Ok it's kind of weird, I'm not sure someone already try this
one 🙂 , i explain :



We are working on a Air app whose allowing to share a "kind
of file"...

To show this kind of file in Air, you have to load it in a
HTML file, and show it in a HTML component ( Air framework HTML
component, and actually it's for display PDF file... ).

Someone sends a file, and other participants receive file's
url.

The file's url is build with : sharedFileDescriptor.url +
sharedFileDescriptor.name...

When i'm logged as owner, no problem, everything just work,
and my HTML component load the remote file (from the FileManager
folder on AFCS folder ) and show it correctly in the HTML component
( who use acrobat reader to display this "kind of file" 🙂 ).

But there is the problem :

Only users logged as owners can load it correctly. When
guests are connected to the room and are trying to load the file,
even if the room.autoPromoteUsers is set to true, the HTML
component load the "Acrobat Connect HTML error page", whose
explains that the room is not active...



Any ideas ?
1 Accepted Solution
Hironmay
Correct answer by
Level 10
Level 10
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

View solution in original post

0 Replies
Hironmay
Level 10
Level 10
Hi,

I am not sure that if this is the issue but

I will say try selecting the file folder from dev console,
and configure to give access to viewer and publish Model to
Publisher. The UI may not reflect correctly but it will actually
change in node and collectionnode. There was a bug related to this
which was fixed couple of days back and will be updated in next
build. This might fix your problem of access and in any case,
changing the access and publish value from dev console may come in
handy.

The post for that bug is


http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=759&threadid=1430874&e...



Let us know if that's the issue and it gets fixed or not.

Thanks

Hironmay Basu

Syferius
Level 2
Level 2
Nope. This is not a solution. Even changing Models to
PUBLISHER still sending 404. When logging as OWNER all is
good
Hironmay
Level 10
Level 10
Hi,



What do you mean by model changing back to publisher in your
earlier post. You need change the fileGroup's nodeConfiguration's
publish model to be Publisher. I will still run the example. Can
you attach a small sample code that you are using where you can't
upload ? I can then debug more into details.



Thanks

Hironmay Basu
Syferius
Level 2
Level 2
I goes to dev console, select a folder and set rights to
publisher, both to access and publish models. i'm uploading images
and i want all the guests be able to see this images. But in guest
can't see them, server answering 404 error (not available), but
when login as OWNER all images are seen.

p.s

Auto-Promote Users is set
Hironmay
Level 10
Level 10
Hi,



If you want the guest users to view the images, set the
access model to viewer from dev console. On UI, it will still shown
as Owner after you set it to viewer,

but in code it changes , so after that if you see in the code
it will be accessible to Viewer. Also, don't change once you have
changed, else you will need to reset it again. This bug has been
fixed for the UI and will be updated in the next Afcs drop.



Thanks

Hironmay Basu
Erick_G_
Level 1
Level 1
hi,

changing the access model is not the solution.

I build a little example : ( just click on a file item after
upload to open it in a new browser window ) :



- As guest ( right click to view the source ):(example was
removed)

Result : a 403 error, or "Acrobat connect error page"...

- As owner :(example was removed)

Works better...



Any idea ?
Syferius
Level 2
Level 2
This is about i'm telling you. I'm changing this to viewer,
to pulisher, nothing works.
Hironmay
Level 10
Level 10
I will run and get back to you later in day.



Thanks

Hironmay Basu
Hironmay
Correct answer by
Level 10
Level 10
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

View solution in original post