Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant get source info #1

Closed
Quantum-Codes opened this issue Aug 30, 2022 · 6 comments
Closed

Cant get source info #1

Quantum-Codes opened this issue Aug 30, 2022 · 6 comments

Comments

@Quantum-Codes
Copy link

Quantum-Codes commented Aug 30, 2022

chrome_screenshot_1661875827838

I was trying to upload graphs generated by matplot lib both in svg
Edit: png works

My code: https://replit.com/@QuantumCodes/graph-uploader#upload.py
How to fix this?

@Quantum-Codes
Copy link
Author

Quantum-Codes commented Aug 31, 2022

os.system("pip install imgbbpy")
token = os.environ['Token']
files = os.listdir("images")

import imgbbpy

client = imgbbpy.SyncClient(token)
image = client.upload(file=f"images/{files[0]}")
print(image.url)

@Quantum-Codes
Copy link
Author

Ok imgbb doesn't support svg..
Supported type: JPG, PNG, BMP, GIF, TIF, WEBP, HEIC, and PDF.

@scrazzz
Copy link
Owner

scrazzz commented Aug 31, 2022

Hello, thanks for opening this issue. I'll make sure to add a statement in the error code to check whether the content is supported by imgbb.

@Quantum-Codes
Copy link
Author

Quantum-Codes commented Sep 1, 2022

Np!
Just a question: is it possible to replace the image through API?

I require a system where the image changes every week but the link stays the same. So is it possible to replace the image through api? It is possible by the frontend

@scrazzz
Copy link
Owner

scrazzz commented Sep 1, 2022

Np! Just a question: is it possible to replace the image through API?

I require a system where the image changes every week but the link stays the same. So is it possible to replace the image through api? It is possible by the frontend

Sorry, I don't think that's possible. Imgbb assigns a unique value to the link as far as I know.

@Quantum-Codes
Copy link
Author

Ok thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants