Domanda

We are using File Access in trigger.io to get some local files in Android Media Gallery, but when we now pick the image, it seems it always throw a warning Exif data not included in content://media/external/images/media/21#Intent;end and we can't get the image we have chosen.

Here is the full error stack returns by trigger.io.

[WARNING] Exif data not included in content://media/external/images/media/21#Intent;end
[DEBUG] Returned: {"content":{"message":"Error reading file","type":"UNEXPECTED_FAILURE","subtype":null},"callid":"F98E2835-0CA2-48BF-9B16-3DA58681E412","status":"error"}
[WARNING] Exif data not included in content://media/external/images/media/21#Intent;end
[DEBUG] Native call logging.log with task.params: {"message":"[FORGE] \n{ message: 'Error reading file',\n  type: 'UNEXPECTED_FAILURE',\n  subtype: null }","level":20}
[DEBUG] Returned: {"content":null,"callid":"42E4A654-E9C8-4F9B-ADB0-E7560B3F2EA5","status":"success"}
[INFO] No reload update available.

This is a sample code:

forge.file.getImage({source:'gallery',width:'100px'},function(file) {       
            forge.file.base64(file, function (base) {
                forge.logging.log(base);
                var base64 =  'data:image/png;base64,'+base;                
                Zepto('#profile-img').attr('src',base64);
            },function(err){
                forge.logging.log(err);
            });
        });

Can someone from trigger.io answers or explain this problem? Thanks!

È stato utile?

Soluzione

The width option passed to getImage should be just a number, e.g.

forge.file.getImage({source:'gallery', width: 100}, function(file) {
  // ... do stuff with file
});

Instead of the '100px' from your example.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top