RO INC DOCUMENTATION
Doc of Preview API
The Preview API let you fetch preview information about files uploaded.
This API support different preview types depending on the file types, including images, videos, audio, text, ZIP archives, and Microsoft Office files.
No authentication required for preview api !
ENDPOINT
GET /uploader/previewapi?fid=12345
PARAMETER
fid
(REQUIRED) - The File ID of the file.
RESPONSE
Returns JSON with preview object. Commonly fields include:
Success
- Bool,true
if preview no errored.FPath
- File path relative tohttps://ro-inc.xyz/uploader/
.Message
- Status Message.PreviewType
- The preview type, e.g."image"
,"video"
,"text"
, etc.Ext
- File extension.CroppedNm
- Cropped file name for preview to user. Please use this string for file name to user.
PREVIEW TYPES & ADDITIONAL FIELDS
- image, video, audio: Basic preview info, no extra contents.
- text: Includes
TextContent
with the file's text content (HTML-escaped). - zip:
FPath
isnull
. TheMessage
contains HTML to open ZIP viewer. - word:
TextContent
contains Google Docs Viewer embed URL. - excel, powerpoint:
TextContent
contains Microsoft Office Online embed URL. - paintdotnet:
TextContent
contains extracted PDN thumbnail data in Base64 or error message.PDNinfo
contain the PDN information, example{"Width":"16","Height":"16","Layers":"5","Version":"5.0"}
EXAMPLE RESPONSE
{ "Success": true, "FPath": "./uploads/abcd1234_file.mp3", "Message": "Success", "PreviewType": "audio", "Ext": "mp3", "CroppedNm": "file.mp3" }
NOTES
- File paths are relative to
https://ro-inc.xyz/uploader/
. - ZIP preview provides a link to an external ZIP viewer rather than listing contents directly. It is for good user eXperience.
- Office files are previewed using official online viewers (Google Docs or Microsoft Office Online).