Skip to content

Commit

Permalink
Increase video size limit
Browse files Browse the repository at this point in the history
  • Loading branch information
ask-42 committed Jun 7, 2019
1 parent 966e7c3 commit 8e7c6cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/video.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Video < ApplicationRecord
has_one_attached :source

validates :thumbnail, presence: true, blob: { content_type: :image, size_range: 0..500.kilobytes }
validates :source, presence: true, blob: { content_type: :video, size_range: 0..25.megabytes }
validates :source, presence: true, blob: { content_type: :video, size_range: 0..40.megabytes }

belongs_to :user
end
2 changes: 1 addition & 1 deletion frontend/components/video/upload.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class Settings extends React.Component {

<input type="file" id="source" name="video[source]" accept="video/*, .mp4" onChange={this.handleInput("source")}/>
<label htmlFor="source">Select Source Video</label>
{this.state.source ? <span>{this.state.source}</span> : <span className="subtext">Please choose a video file under 25MB</span>}
{this.state.source ? <span>{this.state.source}</span> : <span className="subtext">Please choose a video file under 40MB</span>}
{this.props.errors.source ? <span className="errors">{`File: ${this.props.errors.source}`}</span> : ""}
</div>
</div>
Expand Down

0 comments on commit 8e7c6cc

Please sign in to comment.