OneLoveDTube IPFS Uploader v0.8.5: Getting ready for the new DTube.

v0.8.5 update thumbnail.png

Repository

https://github.com/techcoderx/ipfsVideoUploader

What's new

Uploader HTTP API methods ready for integration on d.tube

Commits:

Referring back to the post I made 2 months ago here, I needed a way to implement a proper API auth system so that the upload API calls can be made public while maintaining the restriction to users in whitelist.txt file (if enabled in config.json). This is to make it possible to upload videos to our upload servers directly from the main interface without having the need to leave d.tube for another upload interface.

I managed to do this by collecting the login access token and using that to identify the user, then allow the file upload if the user is in whitelist.txt. The upload API calls will accept both access token from /logincb (in case of a Steem Keychain or plain posting key auth) as well as SteemConnect access token.

Since SteemConnect have updated the public keys of app accounts as announced here, it is safe to collect the access token as app owners already have the posting key of the app account that users delegate their posting authority to when logging in with SteemConnect.

An investigation was performed on 24th of February 2019 to find out how users are authenticating to the uploader. It lasted for 7 days, and turned out that 1 in 3 users used SteemConnect while the other 2 used Steem Keychain. Therefore, SteemConnect auth will be kept.

Screenshot 2019-03-05 at 6.46.50 PM.png

All uploader API calls are documented here.

Since the API calls are now fully available for any apps to integrate, it is important to add a rate limiter for security reasons (e.g. preventing authentication brute force attacks).

Subtitle uploads

Screenshot 2019-04-20 at 9.39.28 PM.png

Commits:

In order to integrate the uploader with d.tube interface, a missing feature needs to be added, which is subtitle upload (introduced in DTube 0.7 update). Due to the embed player support, only valid WebVTT files will be accepted by the API. All languages in languages.js dependency are supported by the embed player, therefore they are valid for subtitle uploads.

Once the subtitles are uploaded, the user may preview the uploaded subtitle file by clicking on "Preview subtitle" on the respective language, which opens a new browser window that loads the file from IPFS.

Thumbnail swap tool

Screenshot 2019-04-20 at 10.01.17 PM.png

Commits:

Uploaded a wrong thumbnail by mistake? Or just want to change your DTube video thumbnails regardless of how you uploaded it?

When logged in, a user may switch to thumbnail swap mode by clicking the mode switch button located at the top right corner. Now all it takes to replace a video's thumbnail is to provide the link to the video that needs a thumbnail replacement, and uploading a new thumbnail through the same /uploadImage call, but with type URL parameter set to thumbnails so that the upload will be treated as a thumbnail by the API server.

The Steem post will be updated by replacing the snaphash in json_metadata, and replacing the second link in Steem article body to the link to the newly uploaded thumbnail.

Other updates

  • Unit testing has been added thanks to the feedback received from the previous update. They can be run with npm test command.
  • Sync script has been created to sync pins from uploads with other IPFS nodes, which may be run with one simple command. Usage: ./sync.sh <hash type> [Steem username]

Roadmap

When DTube 0.9 rolls out, the next update (v0.9) of the uploader may include the following:

  • Avalon blockchain support (blockchain for DTC tokens)
  • Revival tool to make unplayable videos playable again on DTube
  • Scheduled uploads
  • Usage data checker

Github account

https://github.com/techcoderx

H2
H3
H4
3 columns
2 columns
1 column
16 Comments
Ecency