The Movie Database qoldaýy

This is the error i'm facing

Access to image at 'https://image.tmdb.org/t/p/w500/qx3m9mRUmDZUVQeAe7CAzFX7xCB.jpg' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I want image data as base64 so i'm just doing that using canvas

const img = new window.Image();
img.crossOrigin = "Anonymous";
img.onload = () => {
    const canvas = document.createElement("canvas");
    canvas.width = img.width;
    canvas.height = img.height;
    const ctx = canvas.getContext("2d");
    ctx.drawImage(img, 0, 0);
    const data = ctx.getImageData(0, 0, img.width, img.height); 
};
img.src = url;

1 jaýap (1 ishinen 1 betinde)

Jump to last post

@NayanVR said:
CORS error when working with canvas
This is the error i'm facing

Access to image at 'https://image.tmdb.org/t/p/w500/qx3m9mRUmDZUVQeAe7CAzFX7xCB.jpg' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I want image data as base64 so i'm just doing that using canvas

const img = new window.Image();
img.crossOrigin = "Anonymous";
img.onload = () => {
    const canvas = document.createElement("canvas");
    canvas.width = img.width;
    canvas.height = img.height;
    const ctx = canvas.getContext("2d");
    ctx.drawImage(img, 0, 0);
    const data = ctx.getImageData(0, 0, img.width, img.height); 
};
img.src = url;

CORS Issues
See if this research can help.
https://www.themoviedb.org/talk/search?advanced_search=&query=CORS&with_category=&with_status%5B%5D=closed&with_status%5B%5D=open
In some of the topics the problem was solved.
https://www.themoviedb.org/talk/5f55e3dd713ed40037f090d4
https://www.themoviedb.org/talk/5833110992514162cf03b7bd
https://www.themoviedb.org/talk/5c5dff05925141338cbce2db
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSNotSupportingCredentials

And this
https://www.themoviedb.org/talk/5f621eae93388b003864513c
https://www.themoviedb.org/talk/5eb07271a13533001b72740a

Fılmdi nemese kórsetimdi taba almadyńyz ba? Ony jasaý úshin kirińiz.

Ǵalamdyq

s kezelimdi izdeý jolaǵyna aýystyrý
p profaıl mázirin ashý
esc ashyq terezeni jabý
? perneler tirkesimi terezesin ashý

Tasyǵyshtar betterinde

b artqa oralý (nemese qoldanylatyn bolsa, tektikke)
e óńdeý betine ótý

Telemaýsym betterinde

(oń jaq kórsetki) kelesi telemaýsymǵa ótý
(sol jaq kórsetki) aldyńǵy telemaýsymǵa ótý

Epizod betterinde

(oń jaq kórsetki) kelesi epızodqa ótý
(sol jaq kórsetki) aldyńǵy epızodqa ótý

Barlyq keskin betterinde

a keskin ústeý terezesin ashý

Barlyq óńdeý betterinde

t tárjime tańdaǵyshyn ashý
ctrl+ s pishindi jiberý

Talqylaý betterinde

n jańa talqylaýdy jasaý
w qaralǵan kúıin aýystyrý
p jalpy/jekeni aýystyrý
c jabý/ashýdy aýystyrý
a áreketterdi ashý
r talqylaýǵa jaýap berý
l sońǵy jaýapqa ótý
ctrl+ enter habaryńyzdy jiberý
(oń jaq kórsetki) kelesi betke
(sol jaq kórsetki) aldyńǵy betke

Parametrler

Want to rate or add this item to a list?

Kirý