YeetYourFiles Extension Documentation

"Upload files to the cloud by throwing it into outer space!"

The YeetYourFiles extension allows you to upload files directly from your PenguinMod/TurboWarp projects to the YeetYourFiles hosting service. This extension provides blocks for uploading various types of files, tracking upload status, and retrieving file information.

File Upload Blocks

Upload File Data

upload file data [data] name [file.txt] :: #FF8C00

Uploads file data with a specified filename to YeetYourFiles.

Parameters:

Examples:

Upload File from URL

upload file from URL [https://example.com/image.png] :: #FF8C00

Downloads a file from a URL and uploads it to YeetYourFiles.

Parameters:

Examples:

Open File Dialog

open file dialog and upload :: #FF8C00

Opens a file picker dialog allowing users to select and upload files from their device.

This block:

File Information Blocks

Last Uploaded File ID

(last uploaded file ID :: #FF8C00)

Returns the unique identifier of the most recently uploaded file.

Examples:

Last Uploaded File URL

(last uploaded file URL :: #FF8C00)

Returns the complete web address where the uploaded file can be accessed.

Examples:

Last Uploaded File Short Hash

(last uploaded file short hash :: #FF8C00)

Returns a the short hash used by the server on some routes.

Examples:

Last Uploaded File Data

(last uploaded file data :: #FF8C00)

Returns the complete upload response as a JSON string containing the response from the server (should be used for advanced stuff)

Example response:

{
   "message":"File uploaded successfully",
   "fileId":"16fd17d4-0d36-4318-9452-f19cb3259374",
   "fileUrl":"/file/123456ab/MubiIsCool.mov",
   "shortHash":"123456ab"
}

Status and Monitoring Blocks

Upload Status

(upload status :: #FF8C00)

Returns the current status of file uploads.

Possible values:

Upload Successful?

<upload successful? :: #FF8C00>

Returns true if the last upload operation completed successfully, false otherwise.

Examples:

Uploaded?

<uploaded? :: #FF8C00>

Returns true if any file has been uploaded during the current session, false otherwise.

Examples:

Total Files on YeetYourFiles

(total files on YeetYourFiles :: #FF8C00)

Returns the total number of files currently hosted on the YeetYourFiles service.

Examples:

Usage Examples

Basic Text Upload

when flag clicked upload file data [Hello from Scratch!] name [message.txt] wait until <upload successful?> say (join [File uploaded: ] (last uploaded file URL)) for (2) seconds

Upload with Status Monitoring

when flag clicked upload file data [{"score": 100, "level": 5}] name [game-data.json] repeat until <not (upload status) = [uploading]> say [Uploading...] for (0.1) seconds end if <upload successful?> then say [Upload complete!] for (2) seconds else say [Upload failed!] for (2) seconds end

Interactive File Upload

when [space v] key pressed open file dialog and upload wait until <uploaded?> if <upload successful?> then set [file count v] to (total files on YeetYourFiles) say (join [Uploaded! Total files: ] (file count)) for (2) seconds end

Error Handling

(You can use PenguinMod's Try and Catch block with it!)

The extension includes built-in error handling for common issues:

When an upload fails:

Service Information

YeetYourFiles Service: https://yyf.mubilop.com

Additional Notes