EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

cross-origin issue with files in appery DB

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

cross-origin issue with files in appery DB

Hello,

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

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

cross-origin issue with files in appery DB

thk you, i ll check this out

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

cross-origin issue with files in appery DB

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

cross-origin issue with files in appery DB

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

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

cross-origin issue with files in appery DB

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.

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

cross-origin issue with files in appery DB

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

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

cross-origin issue with files in appery DB

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

cross-origin issue with files in appery DB

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?

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

cross-origin issue with files in appery DB

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

Return to “Issues”