Jump to content

Upload Picture via. MTA web server.


Recommended Posts

Since you're actually able to write on any directory using PHP, you could simply place the uploaded images into a resource's folder. And as I guess you would like to retrieve a list of uploaded images without 'linking' them to the resource itself nor its meta file, I recommend you to use FileSystem in order to list all the files within the folder itself and then you can simply operate with their content or whatever.

An example:

  
local system = createFilesystemInterface() 
local folder = system.createTranslator("/") 
local files = folder.scanDir("/", "*", false) 
for i,v in ipairs(files) do print(v) end 
  

Link to comment

That's not what I mean, I already know how to do that, it's simple.

Players can log onto the website (website resource), they can select "Upload Photo", they can select the photos from their desktop, they can hit 'send', I want the pictures to be uploaded and sent to my MTA server and saved in a resource, I reload said resource, the website reloads and the image appears on the website for others to view.

The bolded part of my description is what I'm wondering is possible.

Just like on Facebook or any other website you can upload pictures onto their servers and then have it displayed on the website for everyone to see. I want the same thing.

Link to comment
  • 4 months later...
But how will you get the photo from the CLIENT'S COMPUTER?? I don't think it's possible.
He can do a note that the player should set the images on the resource file

then it will be possible

Erm... using PHP? He already mentioned that.

Players can log onto the website (website resource), they can select "Upload Photo"
Link to comment

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...