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

Direct upload not working #123

Open
0000sir opened this issue May 24, 2023 · 1 comment
Open

Direct upload not working #123

0000sir opened this issue May 24, 2023 · 1 comment

Comments

@0000sir
Copy link

0000sir commented May 24, 2023

I'm having v3.0.1 with rails 5.2.0, try upload file to Minio with protocol S3.
File was uploaded to rails backend and then transfer to minio later, I checked this views file app/views/trestle/active_storage/_has_one_field.html.erb it do has direct_upload: true instructions, is there anything I'm missing, help me fix this please.

The code I'm using:

form do |video|
      text_field :title
      select :category_id, Category.all, {}
      select :serial_id, Serial.all, include_blank: "select"
      active_storage_field :file, multiple: true, direct_upload: true
  end

HTML it generates:

<div class="form-group"><label class="control-label" for="video_file">Video</label><div class="active-storage">

  <div class="progress" style="display: none">
    <div class="progress-bar progress-bar-striped active"></div>
  </div>

  <input class="active-storage__field" type="file" name="video[file]" id="video_file">
</div>
</div>

A progress bar was generated, but nothing happened when I submit the form.

Anybody know this, pls help, thank you.

@0000sir
Copy link
Author

0000sir commented May 24, 2023

I can sure direct upload works fine in the original rails forms.

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

No branches or pull requests

1 participant