New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validating Upload File for Immediate Publish #11
Conversation
sag333ar
commented
Feb 29, 2024
- With the help of fluent-ffmpeg, we check uploaded file info
- If it's mp4/mov, we mark it TRUE for immediate publish.
@vaultec81, @sisygoboom - your review required |
@sisygoboom , @vaultec81 - addressed all PR changes. Please re-review |
…hub.com/spknetwork/acela-core into feature/validate-file-type
…hub.com/spknetwork/acela-core into feature/validate-file-type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff, loving use of exit early and modularity. Just left some non-critical things to bear in mind
}) | ||
} | ||
|
||
async updateHiveVideoPost({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the only time the Video model is updated? it may help to describe what stage its being updated at or whats being updated
@@ -3,42 +3,69 @@ import hiveJsPackage from '@hiveio/hive-js'; | |||
import { AuthorPerm, OperationsArray } from "./types"; | |||
import { Client, ExtendedAccount, Operation, PrivateKey, PublicKey, Signature } from '@hiveio/dhive'; | |||
import crypto from 'crypto' | |||
import 'dotenv/config' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, clever; I'd been using Nest's ConfigService, but its awesome if this works! We should aim to have a unified approach across the codebase though
|
||
@Injectable() | ||
export class IpfsService { | ||
readonly #axios = new Axios(); | ||
// readonly #axios = new Axios(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to delete if not needed
|
||
@ApiProperty({ | ||
description: 'permlink of the post', | ||
default: 'ec102517-7be9-4255-9d07-75a525a88565', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be generated using uuid? There's a risk of multiple videos getting the same id or permlink
|
||
@ApiProperty({ | ||
description: 'file name which TUSd provided', | ||
default: 'e1e7903087f9c39ac1645d69f5bb96cd', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, these ones and below are possibly better off not having defaults if we're unsure what they are, just add validation so they fail if these properties are missing