Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Latest commit

 

History

History
32 lines (24 loc) · 1.29 KB

README.md

File metadata and controls

32 lines (24 loc) · 1.29 KB

GoFile4j

Codacy Badge

A java wrapper for the https://gofile.io API

Uploading files

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();

Use the FileUploadResult

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.