Giter Club home page Giter Club logo

waffle_gcs's People

Contributors

almirsarajcic avatar iangreenleaf avatar montebrown avatar tyler-eon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

waffle_gcs's Issues

Is this project dead?

There has been many attempts to fix some issues with it, but non merged for a while now. If it's dead and we need to make a new one, please tell us.

Cannot pass headers

When the image gets uploaded, when I open image URL it gets downloaded instead of being shown in the browser, because the Content-Type header is missing.

For S3 adapter uploader definition can have s3_object_headers/2 function that returns keywords list. Example:

def s3_object_headers(_version, {_file, _scope}) do
  [content_type: "image/jpeg"]
end

Waffle GCS adapter currently doesn't have this option, but Arc GCS adapter does (https://github.com/martide/arc_gcs/blob/ad6826124ac176fb52e00869f49a19cde860e227/lib/arc/storage/gcs.ex#L133).

Doesn't work with updated Waffle

When I run mix deps.get I get the following error message:

Resolving Hex dependencies...

Failed to use "waffle" (version 1.1.0) because
  waffle_gcs (versions 0.1.0 and 0.1.1) requires ~> 0.0.3
  mix.exs specifies ~> 1.1.0

** (Mix) Hex dependency resolution failed, change the version requirements of your dependencies or unlock them (by using mix deps.update or mix deps.unlock). If you are unable to resolve the conflicts you can try overriding with {:dependency, "~> 1.0", override: true}

Needs an update for waffle from version 0.0.3 to 1.1.0.

Add support for recent goth versions.

At this moment, this package is not compatible with the new versions of Goth. We should use Goth.fetch/1 instead of Goth.Token.for_scope/1

Deprecation:

warning: Goth.Token.for_scope/1 is deprecated. Use Goth.fetch/1 instead

I'll be happy to contribute in this project to add this support.
Are you open to receive new PRs? Is the library still maintained?

Generates wrong URL for CDN

If I have CDN in front of GCS bucket and have this in my config:

config :waffle,
  storage: Waffle.Storage.Google.CloudStorage,
  bucket: "bucket_name",
  asset_host: "cdn-domain.com"

Avatar.url("image.jpg") will generate URLs that have bucket name in the path, e. g. https://cdn-domain.com/bucket_name/uploads/image.jpg instead of https://cdn-domain.com/uploads/image.jpg.

Storage adapter Waffle.Storage.S3 generates URLs correctly without bucket name in the path. GCS adapter should replicate that behaviour.

Unable to generate a signed URL on GAE with default service account

Hey there,

I have opened the issue on Goth here peburrows/goth#107 but it may very well be an issue with waffle_gcs or with my code / config entirely. I am sorry if this is wrong place.

In short: I am using waffle_gcs on GAE, with a default service account and I am not providing any config, just relying on Goth picking up the defaults.

The service account is a Storage Admin, so has full access to uploading files to buckets. And indeed, uploading itself works. The app, however, crashes every time we are trying to generate signed URL. The issue seems to be with this line:

https://github.com/tyler-eon/waffle_gcs/blob/master/lib/waffle/storage/google/url_v2.ex#L82

which returns :error. Any ideas you may have I appreciate...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.