-
Notifications
You must be signed in to change notification settings - Fork 206
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
(WIP)Add ".tiff" as content upload type #577
(WIP)Add ".tiff" as content upload type #577
Conversation
app/models/warpable.rb
Outdated
@@ -11,7 +11,7 @@ class Warpable < ActiveRecord::Base | |||
:small=> "240x180", | |||
:thumb => "100x100>" } | |||
|
|||
validates_attachment_content_type :image, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif"] | |||
validates_attachment_content_type :image, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif", "image/tiff"] |
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.
Line is too long. [128/80]
app/models/warpable.rb
Outdated
@@ -11,7 +11,7 @@ class Warpable < ActiveRecord::Base | |||
:small=> "240x180", | |||
:thumb => "100x100>" } | |||
|
|||
validates_attachment_content_type :image, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif"] | |||
validates_attachment_content_type :image, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif", "image/tiff"] |
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.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
app/models/warpable.rb
Outdated
@@ -11,7 +11,7 @@ class Warpable < ActiveRecord::Base | |||
:small=> "240x180", | |||
:thumb => "100x100>" } | |||
|
|||
validates_attachment_content_type :image, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif"] | |||
validates_attachment_content_type :image, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif", "image/tiff"] |
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.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
Code Climate has analyzed commit 9003a465 and detected 3 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Codecov Report
@@ Coverage Diff @@
## main #577 +/- ##
=======================================
Coverage 72.43% 72.43%
=======================================
Files 35 35
Lines 1335 1335
=======================================
Hits 967 967
Misses 368 368
|
789d2d0
to
eabb55f
Compare
Wow cool! Are you able to confirm manually that a Tiff can be uploaded?
Thanks Cess!
…On Wed, May 1, 2019, 8:10 PM codecov[bot] ***@***.***> wrote:
Codecov <https://codecov.io/gh/publiclab/mapknitter/pull/577?src=pr&el=h1>
Report
Merging #577
<https://codecov.io/gh/publiclab/mapknitter/pull/577?src=pr&el=desc> into
main
<https://codecov.io/gh/publiclab/mapknitter/commit/b1201fe213816022078ca43d6e980a7547d08ab6?src=pr&el=desc>
will *not change* coverage.
The diff coverage is 100%.
[image: Impacted file tree graph]
<https://codecov.io/gh/publiclab/mapknitter/pull/577?src=pr&el=tree>
@@ Coverage Diff @@
## main #577 +/- ##
=======================================
Coverage 71.48% 71.48%
=======================================
Files 31 31
Lines 1252 1252
=======================================
Hits 895 895
Misses 357 357
Impacted Files
<https://codecov.io/gh/publiclab/mapknitter/pull/577?src=pr&el=tree> Coverage
Δ
app/models/warpable.rb
<https://codecov.io/gh/publiclab/mapknitter/pull/577/diff?src=pr&el=tree#diff-YXBwL21vZGVscy93YXJwYWJsZS5yYg==> 87.8%
<100%> (ø) ⬆️
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#577 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAF6J4456UXPQQGRBEF7QDPTIWOTANCNFSM4HJ2SJ6A>
.
|
Actually this should be all good; i'm wondering if a .tiff can be exported in |
Hey @jywarren, The upload is working fine but placing the image on the map fails. The js error returned is |
ahhh, ok, we're going to be updating that function soon and taking it out
of the mapknitter code. It's looking for gps compass data in a jpg image.
Do you think you can coordinate with @rexagod to remove this from the
mapknitter codebase as @rexagod is working on reimplementing it as part of
Leaflet.DistortableImage? We can even just comment out the line where the
function is called, for now. Thanks!
…On Thu, May 2, 2019, 8:46 AM Cess ***@***.***> wrote:
Hey @jywarren <https://github.com/jywarren>, The upload is working fine
but placing the image on the map fails. The js error returned is "No
compass found" I narrowed it down to this
https://github.com/publiclab/mapknitter/blob/main/app/assets/javascripts/mapknitter/Map.js#L300-L310
but not sure why this is happening. Any ideas?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#577 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAF6J7F4K2KBURE2UK64M3PTLO7NANCNFSM4HJ2SJ6A>
.
|
Just feel free to ping me if this should be merged! Also, @cesswairimu I would be fine sharing merge rights on MapKnitter with you if you're comfortable with it. You can (should?) still feel free to ask for reviews from others before merging, but it may speed the process a bit. Thanks! |
Always excited to collab with Cess! 🚀 😄 @cesswairimu I can't push to this branch. Can you add me as a collaborator to your fork of this repo? @jywarren I made the requested changes to the EXIF PR a week ago, and I do understand that you're very busy these days so can you please check it out whenever you have some time? Thanks! |
Also, I added a new comment to the feature detection issue but no rush with this, and thank you @jywarren for mentioning me here! |
Thanks @rexagod 😃 , I just added you as a collaborator |
ah cool thanks @rexagod, I'll check it out, sorry i missed it!
…On Fri, May 3, 2019 at 9:58 AM Cess ***@***.***> wrote:
Thanks @rexagod <https://github.com/rexagod> 😃 , I just sent an invite
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#577 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAF6J5CRRHZ5FHVUD3DWLDPTRAGJANCNFSM4HJ2SJ6A>
.
|
Just noting I tried commenting out the function part, but that did not fix the 'place' still looking into it though. |
Cess can you get on Gitter? I need to clarify a few things. @jywarren, no problem! 👍 |
Cess, just to confirm, did you do anything other than removing both fns and commenting out their calls (i.e., anything other than the diff below)?
|
Nope, I just commented them out as ☝️ and removed them where called in the views |
eabb55f
to
44dcd7a
Compare
This PR has been open for a long time and no activity/ reviews requested has not been addressed. We understand you might be busy and engaged on other things. I am closing this for now...please feel free to reopen if you get some time and would like to finish this. Rem to check if its still available before you reopen. Thanks 😆 😆 |
talk about saved replies to your own PR 🤣 |
Well done |
Fixes #206
rake test
@publiclab/reviewers
for help, in a comment below