See what images were uploaded to imgur using my app ClientID? - imgur

I'm using the https://api.imgur.com/3/image to upload images from JavaScript without oauth.
Is it possible to see what images were uploaded recently using my Client-ID?

Unfortunately it's not directly possible but I think the following approach will give good results: use the following endpoint to retrieve all your associated images:
https://api.imgur.com/3/account/{username}/images
Or the following for account submitted images:
https://api.imgur.com/3/account/{username}/submissions/
For the Username you can use 'me' and you need to send the Client-ID using the correct header:
'Authorization: Client-ID YOUR_CLIENT_ID'
This will return all the images uploaded from the account and you need to filter them yourself.
If you are uploading them to a gallery and want to know only these you can set the time window in the request ( week, day, etc.)

Related

Hosting images when deployed

I'm beginner and using MERN. I've successfully deployed frontend and backend separately on render for testing purposes and when a user signs up they can choose a profile picture, now on localhost this works fine and it successfully adds to mongodb and shows in the web application. However when deployed I get an error that I can't 'GET' the image from the specific path.
Now I'm trying to workout with this is the case but could someone explain in ELI5 terms? Also would I need to host my images such as cloudinary? Thank you.
Tried to upload images when deployed but not being fetched.
You should consider using cloudinary or an S3 bucket to store images in production.
First of all, call your /upload api route
Generate a uuid + .extension (png or jpg)
Upload this key as the name with your image file to cloudinary (for exemple)
Then save this key into your database to be able to access it later on.
If you consider using an S3 bucket, you should always configure a CDN between your client and your bucket to avoid billing’s surprises

Facebook Graph API v10 image upload to Pages feed

I'm trying to upload a image to facebook via graph api v10.
i have followed the docs: https://developers.facebook.com/docs/graph-api/resumable-upload-api/
I'm getting the File-Handle as result, but i dont know how to append this File-handle to my Page post. Does anyone know what i can do with this File-Handle to attach it to a Post I'm automatically posting after the file upload was successful?
Thanks!
I´ve got the same problem. In the Facebook Graph API Documentation it says:
When we're done with uploading the data, you'll get a file handle:
{"h":"2:c2FtcGxlLm1wNA==:image/jpeg:GKAj0gAUCZmJ1voFADip2iIAAAAAbugbAAAA:e:1472075513:ARZ_3ybzrQqEaluMUdI"}
This value can be used in place of an uploaded file for subsequent
graph calls.
However, no examples or further explanations are provided on how to use the received file handler.

Send image in formData without file input

I've been scouring the internet on this one, but I can't seem to find a situation exactly like what I'm trying to do....
I've built a React app (using CRA) which is used to import products from an existing eBay-like site (Reverb.com), make some small modifications, and then post them to a server which, in turn, manages the products on multiple eCommerce platforms. Pulling the data in from the Reverb.com API is easy enough; the problem comes when I submit the data to my local server's API. I need to post the product images from Reverb.com via formData without the user having to manually choose the files via a form input, but I don't have access to fs.createReadStream(). How can I get from an image URL to a file posted via formData?

Node.js and Vue.js, why Refresh make vue.js's store clear? And how can i use uploaded image in vue.js?

Title is my questions.
First. I'm making simple diary app with Node.js and Vue.js. Vue-router using history mode and in backend, using "connect-history-api-fallback" module. I think i did everything i can do, but when i run my app in local, refresh make vue.js's store clear. I googled but can't find same problem. Someone have any idea?
Second. I'm using Multer to upload. Upload is fine, i can see uploaded image. But i don't know how to show that uploaded image.
I mean in vue's template, what path will show uploaded image?
Image uploaded here "/simple-diary/backend/upload/profilePhoto/"
Vue.js component is here "/simple-diary/frontend/src/components/"
#samayo is right.One question per post.So of course when the page refresh the store is refreshed.So if you dont want that you can use plugin like vuex-persistedstate.Or if you want to keep the token and the user that is currently logged then when the user logged in,use localstorage to save the token and the user.Or cookies.Or session storage.You have many options

How can I get individual image_urls from an Instagram album using oembed api call?

I have been using the Instagram API to get images and videos, which works just fine. I then noticed the oembed API call, which does not require an access_token, and I decided to give that a try, which also worked just great as the thumbnail_url size is adequate for most uses.
However, I noticed that the images retrieved from an album, all have a thumbnail_url that returns a 5xx Error from Instagram.
My thinking is that:
a) This is exactly how it is supposed to work and if I want images from a gallery/album, I need to use the media API call and access_token like most normal people
b) There is a way to access all images from a gallery/album and I just don't know yet. What if I want to embed the album? If this is the case, how can I check if it is an album or single image before making an API call?
Here is what I have so far:
Instagram permalink for album/gallery: https://www.instagram.com/p/BTHpAmzDHKR/
OEMBED API call: https://api.instagram.com/oembed/?url=https%3A%2F%2Fwww.instagram.com%2Fp%2FBTHpAmzDHKR%2F
thumbnail_url returned: https://scontent-dft4-2.cdninstagram.com/t51.2885-15/s612x612/e35/18012162_1608580785827161_2716056344971968512_n.jpg
media API working url for same image:
https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/18012162_1608580785827161_2716056344971968512_n.jpg
This opens up to a 5xx Server Error
Is it possible or not using oembed call?
NOTE: I am trying this just out of curiosity and not for any real app.
Closing this out as my research has shown that oembed is for single media type only, not for carousel/albums. Instagram API call which uses tokens is required.

Resources