Jump to content

AppApi Module: AppApiFile


Sebi
 Share

Recommended Posts

AppApiFile adds the /file endpoint to the AppApi routes definition. Makes it possible to query files via the api. 
This module relies on the base module AppApi, which must be installed before AppApiFile can do its work.

Features

You can access all files that are uploaded at any ProcessWire page. Call api/file/route/in/pagetree?file=test.jpg to access a page via its route in the page tree. Alternatively you can call api/file/4242?file=test.jpg (e.g.,) to access a page by its id. The module will make sure that the page is accessible by the active user.

The GET-param "file" defines the basename of the file which you want to get.

The following GET-params (optional) can be used to manipulate an image:

  • width
  • height
  • maxwidth
  • maxheight
  • cropX
  • cropY

Use GET-Param format=base64 to receive the file in base64 format.

  • Like 5
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...