Page 1 of 2

cross-origin issue with files in appery DB

Posted: Mon Jan 18, 2016 7:03 am
by EJLD

Hi There,
I used this code before on another screen and it works well still.
concept: I m uploading a file from device to appery's DB.
then, wld like canvas it to get the base64 data.

However, I have the following error msg:

Image

here is the code I am using which bears the
img.attr('crossOrigin', 'anonymous');

Image

any idea ?

thk you very much in advance as always
Eric


cross-origin issue with files in appery DB

Posted: Mon Jan 18, 2016 9:26 am
by Serhii Kulibaba

Hello,

Please look at this documentation page: https://devcenter.appery.io/documenta...


cross-origin issue with files in appery DB

Posted: Mon Jan 18, 2016 10:05 am
by EJLD

thk you, i ll check this out


cross-origin issue with files in appery DB

Posted: Tue Jan 19, 2016 11:33 pm
by EJLD

Hi Sergiy, I looked at the link but there is not much there we know already.
I tried several ways trying to understand where my crossOrigin issue comes from.

I found out something interesting with the _files collection in the appery DB:
a/ when uploading files from the DB console, the "owner" column does not get any number,
b/ at the contrary, when uploading a file using the API through the app with an INPUT set to "file", it does fill in the "owner" column with a number.

as a result, when I process my code in above post using a "a" file without ownerCode = no crossOrigin issue,
but when it is the case of a file "b", the crossOrigin error pops up !

may I ask you to look into this ?
I am not asking to strengthen the upload-through-DB-console way with a owner number which will block my code,
but help me with the header which will allow to process my code even though the file was uploaded through the app INPUT file field.

thk you very much in advance,
best
Eric


cross-origin issue with files in appery DB

Posted: Fri Jan 22, 2016 1:02 pm
by Serhii Kulibaba

Please share (http://devcenter.appery.io/documentat...) your app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and provide us with the following information:

1) App name
2) Test credentials if login functionality is implemented in your app
3) Detailed steps to reproduce the issue


cross-origin issue with files in appery DB

Posted: Sat Jan 23, 2016 12:23 am
by EJLD

thk you Sergiy. investigating some more, it seems the problem comes from somewhere else. I hv to look into it again. may come bk to you when clarified (if not solved :) ). enjoy your wknd.


cross-origin issue with files in appery DB

Posted: Sat Jan 23, 2016 9:20 am
by EJLD

Hi There, I went through my code again and to me there is an issue as describe above. Thk you again for taking care of this point. I am sending the app login via email to a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a
as for steps:
0/ enter the username, pw and appNum as in the email
1/ on startScreen : tap on top logo to open panel
2/ in panel : press "profile change" and enter pw
3/ press confirm pw
4/ press further up "your picture"
5 press librairy radio right button
6/ choose a file to upload and press "file upload"
7/ confirm picture
then the console will throw the crossOrigin error.

what is strange to me is that it is exactly the same code (Base64imgProcessing JS asset) as another module (FOM103_offLine JS asset) that you could find as follows:
1/ startScreen = press Find Out More
2/ at the very bottom = press "read and train offline"
3/ press one of the 3 button read yellow or green
4/ it will canvas each of the imgs coming from the _Files collection.

the only difference between those 2 modules is that one is uploading the img using the file INPUT when in the latter case, the imgs were uploaded via the DB console which doesn't create a "owner" code.

looking forward to hearing from you soon,
many thks in advance
Eric

PS: one important thing: appName = collect4good
I put also the DB on share = mybnoteDB


cross-origin issue with files in appery DB

Posted: Wed Jan 27, 2016 11:17 pm
by EJLD

Hi There, any news on that one ? thk you in advance


cross-origin issue with files in appery DB

Posted: Thu Jan 28, 2016 5:17 pm
by Serhii Kulibaba

Could you check the same on the real device (install the app from .apk or .ipa file)?
Or just disable web security in your browser?


cross-origin issue with files in appery DB

Posted: Thu Jan 28, 2016 9:56 pm
by EJLD

installed on a device it is also blocking unfortunately ... any idea ?