[File Plugin] P10 File Plugin GetFileUrlFromUri returning error on Image

[File Plugin] P10 File Plugin GetFileUrlFromUri returning error on Image

  
Forge Component
(3)
Published on 16 Oct (4 weeks ago) by Pedro Oliveira
3 votes
Published on 16 Oct (4 weeks ago) by Pedro Oliveira

Hello, I'm trying to show offline images on app, after save them on the phone, but when im showing the Blob: it works for the first time but then something happen.


Then I changed the way where I would get the image and called the function on the image , calling

 FilePluginController.default.getFileUrlFromUri$Action(model.variables.matchRecordIn.teamsAttr.getCurrent(callContext.iterationContext).logoOfflineAttr).urlOut.value

logoOfflineAttr = file:///storage/emulated/0/Android/data/pt.app.mobile/files/folder/pt-PT/2017-05-17_a.jpg

But the when it should return the Blob, only return a Promise with a pending status and not the Blob it self.

Nobody has a answer to this? 

Hello,

I'm trying to understand the problem you are facing.

For the line:

 FilePluginController.default.getFileUrlFromUri$Action(model.variables.matchRecordIn.teamsAttr.getCurrent(callContext.iterationContext).logoOfflineAttr).urlOut.value


It seems that you are trying to fix the problem with a lot of javascript.


What was exactly the problem before trying this approach?


Thanks,

One more question: Android, iOS or both?

Bruno Martinho wrote:

Hello,

I'm trying to understand the problem you are facing.

For the line:

 FilePluginController.default.getFileUrlFromUri$Action(model.variables.matchRecordIn.teamsAttr.getCurrent(callContext.iterationContext).logoOfflineAttr).urlOut.value


It seems that you are trying to fix the problem with a lot of javascript.


What was exactly the problem before trying this approach?


Thanks,

With the file plugin, we have a function that is called getFileUrlFromUri() and I would like to know, if is possible to call that function on the expression of the image for the path, so i dont have to do a each every time I open the app. Because, at the moment, I already have the native path (file:///emulate/android/....) and when I get the Blob, every time I close the app and open it on Offline mode, the images will be broken because of the blob path is gone.


Overall, I just want a way to get the native images to show on the app.


One more question: Android, iOS or both?

Both.


Hi Miguel,

Here's what you need: http://www.outsystems.com/forge/Component_Overview.aspx?ProjectId=2318

The image rendering is triggered on two events: OnReady and OnParameters changed.

The widget also has an OnLoad event to enable callbacks on image loaded.

Kind Regards,
João Grazina