SkittlesAreFalling Posted January 12, 2015 Posted January 12, 2015 Hello, I am in the process of creating a custom website for my MTA server and I was wondering if it's possible for web clients to upload gallery photos to the web resource? Any example?
AJXB Posted January 12, 2015 Posted January 12, 2015 if you mean "can a user upload a photo to a website?" then I presume yes, PHP
SkittlesAreFalling Posted January 12, 2015 Author Posted January 12, 2015 I already know how to do it with PHP, I'm wondering if it can be done with the MTA server.
Sasu Posted January 12, 2015 Posted January 12, 2015 I still don't understand, you want to upload photos to a web from mta server? If so, then I think you can use callRemote
SkittlesAreFalling Posted January 15, 2015 Author Posted January 15, 2015 I made a website resource, I want it so players can upload a picture on the website and the picture gets saved onto the website resource.
novo Posted January 15, 2015 Posted January 15, 2015 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
SkittlesAreFalling Posted January 16, 2015 Author Posted January 16, 2015 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.
novo Posted January 16, 2015 Posted January 16, 2015 Hmm well I'm actually not understanding what you want to accomplish, though in case you want to save the uploaded images in a resource I suppose you want that the resource itself recognizes/loads these images; what would require you to modify its meta file (reference).
Sasu Posted January 17, 2015 Posted January 17, 2015 You can make a script in mta that create a image's file and send the image to it via php
SkittlesAreFalling Posted January 18, 2015 Author Posted January 18, 2015 I'm just going to assume no this is not possible.
SkittlesAreFalling Posted May 21, 2015 Author Posted May 21, 2015 Found my answer! https://wiki.multitheftauto.com/wiki/FetchRemote It's in the example.
Anubhav Posted May 21, 2015 Posted May 21, 2015 But how will you get the photo from the CLIENT'S COMPUTER?? I don't think it's possible.
ALw7sH Posted May 21, 2015 Posted May 21, 2015 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
Addlibs Posted May 21, 2015 Posted May 21, 2015 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 filethen it will be possible Erm... using PHP? He already mentioned that. Players can log onto the website (website resource), they can select "Upload Photo"
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now