Jump to content

Report system with screenshot support


joaosilva099

Recommended Posts

Posted

Hi all!

This time I am trying to make a report system with screenshot support.

First, I though using onPlayerScreenShot and save the imageData to a database, then I discovered that I can't convert image data to text.

I don't want to spend too much disk space with images. How can I do that?

350x20_FFFFFF_FFFFFF_000000_000000.png

http://i.imgur.com/CSE28MJ.png

Don't hesitate to contact me for anything! If I can help, I will for sure!

Education is the most powerful weapon which you can use to change the world. - Castillo

  • MTA Team
Posted

You could store the data on a remote Web Server.

DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp

 
  • MTA Team
Posted

And why can't you store your image data as a BLOB on a Database?

DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp

 
Posted
And why can't you store your image data as a BLOB on a Database?

Because I didn't even know for what the BLOB data type was. (Google helped me AGAIN!)

THANKSSSS :D

350x20_FFFFFF_FFFFFF_000000_000000.png

http://i.imgur.com/CSE28MJ.png

Don't hesitate to contact me for anything! If I can help, I will for sure!

Education is the most powerful weapon which you can use to change the world. - Castillo

Posted
Yes, you can store images in the database, but it's not advisable and bad practice.

Do not store images in the database. Store images in directories and store references to the images in the database. Like store the path to the image in the database or the image name in the database.

Images can get quite large 1MB >. Even if it's a small image, it's still bad practice. You're putting extra hits on your database transactions that you can completely avoid. No big websites stores images in their database. Craigslist doesn't do it. Facebook doesn't do it. It's not a good idea.

Do as the guy said, store just the references.. what Ciber said is wrong.. you could do something like INSERT INTO yourtablename VALUES ('reportedaccount', 'reportreason', 'pathtoscreenshot')

  • MTA Team
Posted

Actually it's not wrong. Depends on how much network you count on, besides there are many sites that do use this method, tho it's not quite practical, it's a good method and saves Web host space.

You could link the file path asigning it to the report, there are more than one way of achieving the same thing. I think it's not safe to say that one way or another is right or wrong.

DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp

 
  • MTA Team
Posted

It's just a heavy query, you don't need more than 1 query to store an image. Besides, if you have a DB server, you might as well use it..

DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp

 
Posted

My images will have no more than 30KB size. :)

And CiBeR is right. The query just takes longer if i am using that table wich will only contain reports. Other tables may work fine

350x20_FFFFFF_FFFFFF_000000_000000.png

http://i.imgur.com/CSE28MJ.png

Don't hesitate to contact me for anything! If I can help, I will for sure!

Education is the most powerful weapon which you can use to change the world. - Castillo

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...