Server File Manager Extension

Open in App

Using this extension you can manage your website hosting server files from your app. you can upload, delete and get your list of files from the app. with help of this extension, you can upload files in the background with an upload progress notification.

Note : This extension is currently supported only in Niotron. in other platforms, this not support because the build server is not able to compile the extension library. We are using the latest Retrofit 2.9.0 library to build this extension. it has included some more libraries like – okHttp3, okio, gson. This problem is the build server does not support Java 8 lambda expressions features. It needs to update these platforms to use the latest android library.

Before using this extension, You need to upload a PHP script to your hosting server. You can download your file from the demo aia file project assets. after downloading, you can remove this file from your project.

After unzipping this file you will get 2 php files and one empty uploads folder. make sure that you don’t need to change any code of server.php if you do any changes then maybe your will got errors on your apps. only you need to change in the config.php file some default values like your – apiKey, file types, root folder, and max upload size value.

For security reasons, you need to change your unique API key In your config.php file. Make sure that your API key is private and secure. Don’t add your API key directly in your app. you can use Obfuscated Text or any other secure logic for more security.

config.php API Key Setup :

API Key Block :

Server URL Block :

Server Config Blocks :

Upload Config Blocks :

You need to set the upload file type or format that you want to upload to your server.

  1. Set empty if you want to upload all types of file formats : fileTypes = “”
  2. If you want to upload any particular file format, then set only one file format : fileTypes = “mp3”
  3. For multiple file formats, you need to separate file formats using commas. : fileTypes = “jpg, mp4, mp3”

Max Upload Size : if you are testing your server in localhost then you need to set the maximum upload size is 40 MB, I recommend that to set the max size to lower than 40 MB. if you try to upload a large file then maybe you will get

Notification Config :

You can set all these config blocks for notification.

  1. Complete Notification : You can set it to true if you want to show a complete notification.
  2. Error Notification : You can set it to true if you want to show an error notification.
  3. Notification Icon : You need to set the upload notification icon from assets.

App Config Blocks :

  1. Screen Name : Using this block you can define the screen name you want to open when on tap the notification.
  2. Call time-out is the maximum duration of time that we need for upload requests. By default, it’s set to 1 means I have set 1 hour of time.
  3. Connection time-out is for waiting to connect the server in case of any network issues. By default, it’s set to 100 means I have set 100 seconds of time.

Initialize Blocks :

On initialize, you need to set up your all config blocks and add Initialize Server block. after that, you can start the server.

  1. Request Notification : with help of this block, you can request notification permission for the latest android 13 devices.

When you click on the upload button you can check if the service is not running then you can start the service again and open the file picker

After you got the file, use this Upload File block and set the folder name where you want to upload the file. the folder will automatically be created inside the root folder in your server if does not exist. and set the file path with this block.

For upload status, we have three even blocks onStartUpload, onUploadSuccess, and onUploadError. on upload complete, you will get the filename, server file path, and download URL.

With help of List files the block, You can get all lists of files in your server-specific folder.

Delete File Block : Using the server file path, you can delete files from your app.

Open Demo App Blocks

Registered Your Email with this Extension : 

Now you need to register your email with this extension for creating apps. make sure that the email address is the same as you are using for building apps. this extension will automatically detect the genuine extension user.

you need flow these steps to register your extension.

after importing, this extension into your project you need to add one more component to your project which is a new Registered Component this component will initialize the registered library.

 Registered Component :

Download Extension


Note: this component will work for all extensions. without this component, required extensions will not work.

after you will enter your email in this extension register email blocks in initialize or designer session.

That’s all the registered process of this extension. and if you want to update or change your email then you can easily update your email in deephost app. after the update email, you can download again your extension and use it in your project. if you have any doubts then you can reach me by email or WhatsApp.


Similar Posts