Hi,
I’ve setup my File Repo Access URL and uploaded a number of files to the backendless storage, I’ve referenced these files in a couple of my backendless tables. When getting a url directly for these objects in storage they work fine and use my custom domain to load them, when getting the file urls from the backendless tables via the standard backendless api these also seem to reference my custom url as the file location which is great.
However
The issue I have is, I’m using a java Business Logic service for all of my api requests, when a user calls a business logic function that returns the objects in the various tables, the custom URL isn’t present on the files, instead it reverts to the standard url which has my api keys in it.
Is it possible for the URL to be my custom domain when using business logic?
When you request Data object inside the BL using the JavaSDK it uses a CloudCode API Key and in this case the server returns file references which have the CloudCode API Key.
However, there is a fileReferencePrefix option to ask the server return all the file references with the prefix you want.
The issue has been fixed and currently, this is on the testing stage, we are going to release it once the QA department verifies it. We are planning the next release the next week.
Note the ‘api’ and ‘files’ part of the URL is missing? Should I change my setFileReferencePrefix to http://dev.tipple.io/api/files/ ? Or should it do it automatically?
So if you call http://dev.tipple.io/ without api backendless will look up in web folder.
Also, you should give access for NotAuthenticatedUser role. I know that it works as is, but generally should not because NotAuthenticatedUser role and TippleUserRole has the same priority, but permission for NotAuthenticatedUser is DENY. And if some role on the same layer has deny access then we deny the operation. I have created internal ticket BKNDLSS-26485 to fix the issue. If you do not change permission for NotAuthenticatedUser role it will deny access to the files when we release the fix
Good spot, however I do not want NotAuthenticatedUser to have access, so I have enabled it on AuthenticatedUser which I believe will solve the problem you mentioned above?