Skip to content
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

Merged
merged 30 commits into from Apr 5, 2024

Conversation

sag333ar
Copy link
Collaborator

  • With the help of fluent-ffmpeg, we check uploaded file info
  • If it's mp4/mov, we mark it TRUE for immediate publish.

@sag333ar sag333ar self-assigned this Feb 29, 2024
@sag333ar
Copy link
Collaborator Author

@vaultec81, @sisygoboom - your review required

@sag333ar
Copy link
Collaborator Author

@sisygoboom , @vaultec81 - addressed all PR changes. Please re-review

@vaultec81 vaultec81 merged commit a5741d2 into main Apr 5, 2024
Copy link
Collaborator

@sisygoboom sisygoboom left a 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({
Copy link
Collaborator

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'
Copy link
Collaborator

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();
Copy link
Collaborator

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',
Copy link
Collaborator

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',
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants