GoFile API Upload File(s) / Photo(s)
COMMENT
Made by: mvan231
For: @gooba_goobuh on r/Shortcuts discord
Modified for: @avion_avon on RoutineHub Discord to accept photos or files and to handle multiple of respective chosen type
COMMENT
First, we get a file to use
SCRIPTING
Choose from Menu

Menu Result
SCRIPTING
Files

Menu Result
MISSING
file Under Construction
SCRIPTING
Photos

Menu Result
PHOTOS

Photos
SCRIPTING
End Menu

Menu Result
SCRIPTING
Count
Items
in
Menu Result

Count
SCRIPTING
If
Count
is greater than
1
DOCUMENTS
Make
.zip
archive from
Menu Result
Archive Name
[{'value': 'GoFile Zip ', 'class': 'text'}, {'class': 'magic', 'value': 'Current Date', 'glyph': 'assets/cat/Date.svg', 'UUID': ''}]

Archive
SCRIPTING
Otherwise
VARIABLES
Get
Menu Result
SCRIPTING
End If

If Result
COMMENT
Then:
Get best server - https://api.gofile.io/getServer
NETWORK
Get contents of
https://api.gofile.io/servers
Options Under Construction

Contents of URL
COMMENT
Then:
Upload file to specified server - https://{server}.gofile.io/uploadFile
NETWORK
Get contents of
https://
Contents of URL
.gofile.io/uploadFile
Options Under Construction

Contents of URL
DOCUMENTS
Replace
\
with
World
in
Contents of URL

Updated Text
DOCUMENTS
Show
Updated Text
in Quick Look
Showcuts