A java wrapper for the https://gofile.io API
Create a new instance of GoFile4j and provide the Files you want to upload
GoFile4j goFile4j = new GoFile4j(file, file1);
optional: set these values
goFile4j.setEmail("[email protected]"); // The email of the account the upload should be associated with (= manage uploads)
goFile4j.setDescription("description"); // The description shown on the download page
goFile4j.setPassword("password"); // The password used to access the download page
goFile4j.setTags("tag1,tag2,tag3"); // The tags
Upload the files
goFile4j.upload();
The upload method returns a FileUploadResult, here is how you use it:
The two codes getCode()
and getRemovalCode()
return the values from the API.
getDownloadLink()
provides a link to the main download page.
getDirectDownloadLinks()
returns an array of direct download links. These links will not work if the main download page hasn't been visited before.