primordic/IssueDupesLite huggingface dataset:
Repository: themesberg/flowbite-react

Issue #894: Dropdown docs should display `<Dropdown.Item>`, not `<Item>`
Created: 2023-08-01T19:58:17Z
I have searched the Issues to see if this bug has already been reported
 I have tested the latest version

Steps to reproduce

Go to https://www.flowbite-react.com/docs/components/dropdown
Observe incorrect example code

Duplicate issue #920: (docs) wrong example code about navbar
Created: 2023-08-20T08:20:45Z
I have searched the Issues to see if this bug has already been reported
 I have tested the latest version

Steps to reproduce

Go to NavBar Component Docs
Scroll down to Navbar with dropdown
Click to Expand Code

Current behavior
<Dropdown
          inline
          label={<Avatar alt="User settings" img="https://flowbite.com/docs/images/people/profile-picture-5.jpg" rounded/>}
        >
          <Dropdown.Header>
            <span className="block text-sm">
              Bonnie Green
            </span>
            <span className="block truncate text-sm font-medium">
              name@flowbite.com
            </span>
          </Dropdown.Header>
          <Item>
            Dashboard
          </Item>
          <Item>
            Settings
          </Item>
          <Item>
            Earnings
          </Item>
          <Dropdown.Divider />
          <Item>
            Sign out
          </Item>
        </Dropdown>

Expected behavior
<Dropdown
          inline
          label={<Avatar alt="User settings" img="https://flowbite.com/docs/images/people/profile-picture-5.jpg" rounded/>}
        >
          <Dropdown.Header>
            <span className="block text-sm">
              Bonnie Green
            </span>
            <span className="block truncate text-sm font-medium">
              name@flowbite.com
            </span>
          </Dropdown.Header>
          <Dropdown.Item>
            Dashboard
          </Dropdown.Item>
          <Dropdown.Item>
            Settings
          </Dropdown.Item>
          <Dropdown.Item>
            Earnings
          </Dropdown.Item>
          <Dropdown.Divider />
          <Dropdown.Item>
            Sign out
          </Dropdown.Item>
        </Dropdown>

Context
It should be <Dropdown.Item>, but it's <Item>
When I first saw this issue, I was going to contribute that.
But, when I forked the repository, the code was written correctly <Dropdown.Item> (app/docs/components/navbar/navbar.mdx)
It needs check something to make it look right.

Closing comment (2023-08-21T20:59:44Z): Thanks for submitting - this is a duplicate of #894 though. You can search the Issues by the label Documentation to more easily find this. It's not an issue with the Navbar, but the Dropdown.
Repository: themesberg/flowbite-react

Issue #616: Check and fix the "No Display Name" for all components at the documentation
Created: 2023-02-21T11:16:37Z
Radio Buttons doesn't work because of No Display Name html tag
<div className="flex items-center gap-2"> <No Display Name  // TS2304: Cannot find name 'No'. id="Admin" name="role" value="Admin" defaultChecked={true} /> <Label htmlFor="united-state"> Admin </Label> </div>
It looks like find and replace typo in codebase
Screenshots

Edit:
Screenshot from documentation

System information:

Device: Macbook Pro M2 13 inch 16GB
Resolution: 2560 x 1440
OS: Macos Ventura
Browser: Chrome
Version: Chrome 110.0.5481.100 (Official Build) (arm64) & Ventura 13.0

Project information:

Tailwind: 3.2.4
Flowbite: 1.6.3
Flowbite React: 0.3.8
Type: CRA + Vite + Ts

Duplicate issue #627: Wrong information on the documentation website (dropdown)
Created: 2023-02-26T15:34:12Z
In the documentation about the dropdown component, it says the component name is supposed to be DropdownComponent but the real name is Dropdown

Closing comment (2023-02-26T20:08:06Z): Duplicate #616
Repository: themesberg/flowbite-react

Issue #395: Carousel doesn't work correctly in safari (MacOS)
Created: 2022-10-20T10:18:21Z
Describe the bug
Carousel doesn't operate correctly when using desktop safari. It will move only a few pixels as you attempt to navigate through items
To Reproduce
Literally check the website on desktop safari https://flowbite-react.com/carousel
Expected behavior
Each event moves the entire card content fully
Screenshots
https://user-images.githubusercontent.com/94366107/196922775-6a4ee4a9-e5d2-4d92-80df-d6357fa14be9.mov
System information:

Device: MacBook Pro 14
Resolution:
OS: Macos
Browser: Safari
Version: 16.0 (17614.1.25.9.10, 17614)

Project information:
N/A as its happening on the website

Duplicate issue #384: Bug scrollIntoView stopped by carousel change
Created: 2022-10-12T17:11:41Z
Describe the bug
javascript const scrollTo = (element) => { const section = document.querySelector(element); section.scrollIntoView({ behavior: "smooth", block: "start" }); };
To Reproduce
Steps to reproduce the behavior:
Scroll randomly stops in the middle of the page sometimes it seems when picture in carousel is changed. What could produce this error. I tested it with changing slideInterval to 0 whole navigation stopped working... Same bug is with <a href=""....>. Could only be happening on Chromium.
Expected behavior
Not to stop when images changes.
Screenshots
If applicable, add screenshots to help explain your problem.
System information:

Device: WINDOWS PC
Resolution: 2K
OS: WINDOWS
Browser: BRAVE / CHROME
Version: LATEST

Project information:

Tailwind: 3.0.0
Flowbite: 1.4.7
Flowbite React: 0.1.2
Type: CRA

Closing comment (2022-10-20T12:39:50Z): It could be related to #395
Repository: themesberg/flowbite-react

Issue #451: Bugs on Avatar, Dropdown and Button.
Created: 2022-12-01T18:30:15Z
Hey folks 👋, I'm reporting here several bugs of the components that are mentioned in the title.
Avatar:
The problem with the "Avatar" component is the "Color" property that can't even change the color of the "border" and always stays gray. It is in the video running this problem and the code I have is as follows:
<Avatar img={discordImage} rounded bordered color='purple' />
Dropdown:
This problem only happens in safari and not in Google Chrome, which is "Toggle", if I click on the area outside the "Dropdown Menu" nothing happens unless I go and click on the "Dropdown Button" again. As you can see in the video, I make several clicks on the "body" and it starts selecting text and the menu don't disappear.
Button:
As you can see in the video, when I am in google chrome and if I click on the button the "blur" doesn't disappear and stays as it is "focused", but when I do it in safari, it already has the normal behavior. Now you must be asking, and what happens when you are browsing the official flowbite website? The behavior is normal and just seems to only happen when I have it hosted on my computer and even I have tested it with starter project and it has the same problem. It must be because Google Chrome has some special setting for localhost urls, maybe for debug/testing? The truth is, I have searched and found nothing like this on the internet.
Video:
https://user-images.githubusercontent.com/38193239/205129550-e2656f64-ad9c-4dc4-b7e4-0f7b929f7b1a.mov
Project information:

Tailwind: 3.2.4
Flowbite: 1.5.4
Flowbite React: 0.3.5
Type: NextJS (Without Turbopack)

Duplicate issue #432: Dropdown menu does not close when passing onclick event to Dropdown component
Created: 2022-10-13T10:13:20Z
I have passed onclick event to Dropdown to understand if dropdown is open or not.
  <Dropdown
        arrowIcon
        color="light"
        onClick={() => setIsOpen(!isOpen)}
        label={
          <span className="truncate max-w-[150px] md:w-full text-left">
            {project?.name || c('select-project')}
          </span>
        }
        placement="bottom-start"
        size="xs"
      >
But when I pass onclick to that component, I cant  close the dropdown in mobile size. It works on desktop mode

Is there any other way to find if dropdown open or close??

Closing comment (2022-12-03T18:15:23Z): I'm not sure about this one, 'cause there was no more info from users. So... I'm assuming that it could be related to #451 - I'm closing this one.
Repository: themesberg/flowbite-react

Issue #520: Modal backdrop does not cover full screen when viewport size is small
Created: 2023-01-06T11:50:50Z
Describe the bug
Modal backdrop does not cover full screen when viewport size is small
To Reproduce
Steps to reproduce the behavior:

Open https://flowbite-react.com/modal
Toggle modal
Resize window size width to < 767 px

Expected behaviour
Backdrop should always cover full screen
Screenshots

Duplicate issue #537: Modal outflows on top
Created: 2023-01-14T05:43:34Z
Describe the bug
If the default modal has too much contents and the screen width is >=768 px, the modal outflows on the top, hiding the contents.
To Reproduce
Create a default modal, fill it up with a lot of content that should stretch the height of it. It will be okay with screen-width <768, not working =>768px
Screenshots
Here screen width is 767 px

Here screen width is 769 px

<div class="relative h-full w-full p-4 md:h-auto max-w-2xl">
md:h-auto  I found it, this cause the issue.

Closing comment (2023-01-14T15:22:20Z): Maybe it is related to #520 somehow?
Repository: themesberg/flowbite-react

Issue #625: Dropdown should close when we click outside
Created: 2023-02-24T01:21:40Z
Describe the bug
Dropdown should close when we click outside
To Reproduce
Steps to reproduce the behavior:

Click on the dropdown
Click outside the dropdown
Dropdown won't close

Expected behavior
Dropdown should close
Project information:

Tailwind: 3.0.18
Flowbite: 1.6.3
Flowbite React: 0.3.8
Type: Next.js

Duplicate issue #793: Dropdown dismiss on click only works the first time
Created: 2023-06-03T10:25:55Z
Describe the bug
Dropdown dismiss on click only works the first time the dropdown menu is opened
To Reproduce

Trigger drop down
Clicking an item dismisses the menu as expected
Trigger dropdown a second time
Clicking an item does not dismiss the menu

Expected behavior
Clicking a dropdown menu item dismisses the menu consistently
Screenshots

  
    
    

    Screen.Recording.2023-06-03.at.11.21.02.mov
    
  

  

  


System information:

Device: Mac
Resolution:
OS: Monterey
Browser: Chrome
Version: 114.0.5735.90

Project information:

Tailwind: 3.0.0
Flowbite: 1.4.7
Flowbite React: 0.1.2
Type: CRA

Additional context
Add any other context about the problem here.

Closing comment (2023-06-07T00:32:22Z): This is a duplicate of #625 but I didn't realize that and the proposed solution  provided here is great so we can keep the discussion here.
Repository: thingsboard/thingsboard

Issue #8537: [Bug] Dashboard time select issue
Created: 2023-05-13T18:56:44Z
I think there is bug on community Edition of Thingsboard 3.5 . I upgrade it from 3.4.4 . please check dashboard time select picture.
Thingsboard runs on Orangepi zero, Ubuntu 22.04.2 LTS.
3.4.4 version was good
how I can downgrade from 3.5 to 3.4.4?

Duplicate issue #8773: Dashboard Time selection window Corrupt
Created: 2023-06-16T11:59:53Z
We recently Upgraded from 3.4.4 to 3.5.0 to 3.5.1 PE, We facing the Following Issues


Note: Clearing the Browser cache didn't resolve this issue

Closing comment (2023-06-16T13:00:29Z): could be related to #8537
Repository: thingsboard/thingsboard

Issue #8791: How can you change the color of your widget background when it receives certain telemetry?
Created: 2023-06-20T02:06:23Z
Hi everyone,
I would like to have a card widget change background color when certain vales are returned.
For example, I would like the color to change to Green when it receives the telemetry 2 and Red when it receives the telemetry 0.
I have it now so that when the telemetry is 2 it returns with the word Manual mode. I would like it to also change the background color to green as well.
So when the value 2 is received the background color changes to Green and the word Manual mode appears.
Here what the card look like now.


Thanks

Duplicate issue #8779: How can you change the color of your widget background when it receives certain telemetry?
Created: 2023-06-19T01:55:57Z
Hi everyone,
I would like to have a card widget change background color when certain vales are returned.
For example, I would like the color to change to Green when it receives the telemetry 2 and Red when it receives the telemetry 0.
I have it now so that when the telemetry is 2 it returns with the word Manual mode. I would like it to also change the background color to green as well.
So when the value 2 is received the background color changes to Green and the word Manual mode appears.
Here what the card look like now.


Thanks

Closing comment (2024-05-07T12:04:32Z): Closed as duplicate of #8791
Repository: thingsboard/thingsboard

Issue #10998: i try to run thingsboard for development. how to setup all dependencies that thingsboard need ? i  use command mvn spring-boot:run  then i got the error: failed to get all topics please help
Created: 2024-06-13T09:02:37Z
Component


UI
Rule Engine
Installation
Generic

Description
Clear and concise details.
Environment


OS:  name and version
ThingsBoard: version
Browser: name and version


Disclaimer
We appreciate your contribution whether it is a bug report, feature request, or pull request with improvement (hopefully). Please comply with the Community ethics policy, and do not expect us to answer your requests immediately. Also, do not treat GitHub issues as a support channel.

Duplicate issue #10997: i want to run thingsboard for development how to setup all dependencies that thingsboard need
Created: 2024-06-13T09:00:03Z
Component


UI
Rule Engine
Installation
Generic

Description
Clear and concise details.
Environment


OS:  name and version
ThingsBoard: version
Browser: name and version


Disclaimer
We appreciate your contribution whether it is a bug report, feature request, or pull request with improvement (hopefully). Please comply with the Community ethics policy, and do not expect us to answer your requests immediately. Also, do not treat GitHub issues as a support channel.

Closing comment (2024-06-13T16:01:13Z): Closed, as this is a duplicate: #10998
Repository: thingsboard/thingsboard

Issue #3706: Fetch devices based on device type using rest api
Created: 2020-11-11T17:49:44Z
Component

Generic

Description
I want to fetch devices based on device type using rest api but its not working


Environment

ThingsBoard: 3.0

Duplicate issue #2934: Get Devices by DeviceType with REST API
Created: 2020-06-10T11:04:59Z
Hi there,
I try to get all devices by DeviceType with the REST API. Therefore I use FindByQuery, but it don't work.
JSON: { "deviceTypes" : [ "DeviceTypeName" ] }
I post this JSON to BASEURL/api/devices
The response show me this:
<Response [404]>
{"status":404,"message":"Requested item wasn't found!","errorCode":32,"timestamp":"2020-06-10T10:56:25.417+0000","subscriptionErrorCode":null,"subscriptionEntry":null,"subscriptionValue":null}
Thanks in advance

ThingsBoard: 2.5.1 PE

Closing comment (2020-11-12T05:30:27Z): Duplicate of #3706
Repository: thingsboard/thingsboard

Issue #11691: Error during installation tb-web-report
Created: 2024-09-18T20:06:24Z
Hello everyone,
I am using the Thingsboard_PE version and wanted to install the web report.
Unfortunately, this is not possible because there are two errors:

the third-party libraries are no longer all available for installation
the googleapis noto thing does not work anymore

first problem:
~# sudo apt install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \ libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \ libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \ libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \ ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils unzip wget libgbm-dev
Reading package lists... Building dependency tree... Reading state information... Package libasound2 is a virtual package provided by: liboss4-salsa-asound2 4.2-build2020-1ubuntu3 libasound2t64 1.2.11-1build2 (= 1.2.11-1build2) E: Unable to locate package gconf-service E: Package 'libasound2' has no installation candidate E: Unable to locate package libgconf-2-4 E: Unable to locate package libappindicator1
second problem:
:~/noto# wget https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip --2024-09-18 19:56:48--  https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip Resolving noto-website.storage.googleapis.com (noto-website.storage.googleapis.com)... 142.250.181.219, 142.251.209.155, 172.217.16.91, ... Connecting to noto-website.storage.googleapis.com (noto-website.storage.googleapis.com)|142.250.181.219|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2024-09-18 19:56:49 ERROR 404: Not Found.
hope you can help me.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.1 LTS
Release:        24.04
Codename:       noble
Best regards Tom!

Duplicate issue #11705: Downgrading Thingsboard 3.5 to 3.4.3
Created: 2024-09-19T14:12:35Z
Hi ThingsBoard Support.
I am going to downgrade Thingsboard 3.5 to 3.4.3.
I am currently using the Community Edition, and I do not have a backup of the PostgreSQL database.
Can I just download and install ThingsBoard 3.4.3 on existing ThingsBoard 3.5 environments?
(I am okay with losing the data in the database.)
Thank you!

Closing comment (2024-09-19T14:22:39Z): Closed as duplicate #11691
Repository: thingsboard/thingsboard

Issue #3732: [Feature Request] Multi-Factor Authentication (MFA) for User Login
Created: 2020-11-16T09:53:04Z
Is your feature request related to a problem? Please describe.
I have a Professional Edition setup hosted in cloud, using AWS EC2 instance. I need a way to implement more secure login to the dashboard for users preferably through the user of Multi-Factor Authentication (MFA) but currently, there seems to be no way I can implement it.
Describe the solution you'd like
Are there any MFA plugins currently supported for use on ThingsBoard?
Describe alternatives you've considered
The only security feature I know of for user login is the Single Sign On functionality through OAuth 2.0 protocol but it is not what I am looking for.

Duplicate issue #5559: [Question] How do I enable Two-Factor Authentication (2FA)?
Created: 2021-11-15T20:09:05Z
Component


Installation
Generic

Description
How do I enable Two-Factor Authentication (2FA)?
What are the possibilities for MFA or 2FA?
Two-factor authentication (2FA), sometimes referred to as two-step verification or dual-factor authentication, is a security process in which users provide two different authentication factors to verify themselves. 2FA is implemented to better protect both a user's credentials and the resources the user can access.
Environment


ThingsBoard PE

Closing comment (2021-11-16T11:19:06Z): Duplicate of #3732
I really could use some input on how to implement this.
Repository: thingsboard/thingsboard

Issue #9905: How to manage OTA upgrades for multiple MCUs
Created: 2023-12-26T07:23:41Z
My IoT device has 9 MCUs, and each MCU has its own firmware. ThingsBoard's device Profile can only map one firmware OTA firmware package.
My question is: How to let one Device Profile manage multiple different OTA firmware packages?

Duplicate issue #9962: [Question] Add multiple firmware to the same device profile
Created: 2024-01-09T09:53:30Z
Component

Generic

Description
I need to integrate Thingsboard with a collection of devices who run multiple services (some of the dockerized, some of the independent) and such services may be updated independently one of another. I'm currently working on the MQTT client process that will run in these devices to manage the configuration of these services and the upgrade of them, but apparently the MQTT API only allows one firmware to be assigned at a time to the device. How could I hold this scenario so that the update of these services can be done independently and even let multiple of them scheduled?

Closing comment (2024-01-09T10:45:09Z): This question is similar to #9905 and unfortunatley, there is no possibility to assign more than one FW and one SW per device / device profile
Repository: thingsboard/thingsboard

Issue #11622: how to  integrate thingsboard pe with teltonika fmbxx device and get fmb device data in thingsboard pe
Created: 2024-09-11T06:49:52Z
Hello
I want to integrate Teltonika FMBXXX devices to thingsboards PE.
Can any one suggest the way/direction?
is it possible in current version of platform?

Duplicate issue #11715: how can integrate fmbxx device  with thingsboard pe over tcp integration and fetch data on thingsboard ?
Created: 2024-09-20T09:41:01Z
Component


UI
Rule Engine
Installation
Generic

Description
Clear and concise details.
Environment


OS:  name and version
ThingsBoard: version
Browser: name and version


Disclaimer
We appreciate your contribution whether it is a bug report, feature request, or pull request with improvement (hopefully). Please comply with the Community ethics policy, and do not expect us to answer your requests immediately. Also, do not treat GitHub issues as a support channel.

Closing comment (2024-12-31T08:40:29Z): Closed as the duplicate of #11622
Repository: thinkaurelius/titan

Issue #854: Upgrade Guava
Created: 2014-12-01T02:58:20Z
to current version. Remove usage of StopWatch

Duplicate issue #845: Guava 11 compatibility/shading for Hadoop clusters
Created: 2014-11-24T13:21:37Z
#844 showed how using Guava API elements newer than 11 can blow up on a Hadoop cluster.
We could go back to the MapReduce job-jar approach, where we copy every class in Titan's dependency tree (and Titan) to a fat jar, then shade the whole thing, and call Job.setJar on that instead of using the distributed cache.  It's inflexible and wasteful of space, but it will work even if Hadoop forces Guava 11 to the front of the classpath.  I would love to find a way around this that would let us use the distributed cache.  I don't see one.
Just shading Titan's own artifacts might help a bit, but it can't completely guard against recurrence when we upgrade dependencies or exercise new code paths in existing dependencies, since there are paths to Guava versions later than 11 through many dependencies out of Titan's direct control.  And I don't want to upload a huge chunk of our dependency tree in shaded form to Maven Central if I can avoid it.  Building a fat shaded MapReduce job-jar is kind of a compromise.
TP3 is currently on Guava 15.0.  Some of this may apply there as well.

Closing comment (2015-03-19T23:31:20Z): Related to #854.
Repository: thinkaurelius/titan

Issue #634: Make "Key" a reserved system name
Created: 2014-04-24T23:40:23Z
for types so that it can be used as an implicit key. Currently conflicts with unit tests.

Duplicate issue #730: Reserved names for vertex labels
Created: 2014-08-25T20:03:12Z
"vertex", "element", "edge", "property", "label" should be reserved names for vertex labels, edge labels, and property keys.

Closing comment (2014-09-27T05:27:36Z): Related to #634. Needs to be revisited for the 1.0 release since this would be a backwards incompatible change.
Repository: thinkaurelius/titan

Issue #1070: Update OperationCountingTest
Created: 2015-05-01T06:04:45Z
and re-add ignored test cases. Make sure numbers line up right.

Duplicate issue #1074: Port #931 / #973 / #988 from titan05
Created: 2015-05-05T11:14:25Z
These titan05 commits seem to be logically applicable on titan09, but StandardTitanTx has changed too much for a cherry pick to make any sense:

43690b3
41fa561
4962db3
84138c6
879c9a1
82d629f (#988 / #973, but related)
dbae2d6 (#988 / #973, but related)

The other files touched by these commits are generally trivial.  The subtleties seem to be all in STTx.

Closing comment (2015-05-05T18:38:48Z): Yes, keeping the instrumentation around StoreManager and the additional test cases will be critical. What I was trying to say is that the fixes in 84138c6 and dbae2d6 where manually applied to titan09 since the respective logic in StandardTitanTx looks different now.
In many ways this is related to #1070 and we should:

Make sure the functionality around metrics is carried over
All new test cases and test case updates are carried over
Then fix any remaining issues.

Assigning to me for now.
Repository: thinkaurelius/titan

Issue #312: Cassandra backed support through native transport and cql
Created: 2013-06-26T21:06:09Z
I'm looking to implement storage support for Cassandra, using CQL and native transport protocol.
I do have a draft version that is working  but there are still improvements to add.
I have implemented as a separate module, to not mess with the dependencies.
If is it something that it could be interesting to Titan community, then, I will make a pull request.
Let me know your thoughts.

Duplicate issue #1052: Cassandra 2.1 CQL3 Support
Created: 2015-04-29T09:36:47Z
Cassandra 2.1 CLQ3 shows 160% and 150% (read and write respectively) performance gain over the deprecated Thrift framework. A huge optimisation with the combination Titan-Cassandra can be made.

Closing comment (2015-06-24T18:57:21Z): This is essentially a duplicate of #312
Repository: thoughtbot/paperclip

Issue #96: Stream file from S3 when downloading, rather than loading into memory
Created: 2009-09-24T10:10:13Z
This patch makes a tiny change to the way files are downloaded from S3. Rather than download the entire file to memory first (as it does currently) it uses the #stream method provided by aws-s3 to get the file in chunks. This is more memory efficient and will be slightly faster for large files:
http://github.com/mkdynamic/paperclip/commit/0bca13668d38315a284dea2b8f674efe5e3eb922

Duplicate issue #408: S3 storage needlessly loads remote files into memory
Created: 2011-02-02T17:30:12Z
Paperclip::Storage::S3#to_file saves files on S3 into a tempfile for local access. Unfortunately, it loads the entire file into memory before doing so, which is a Really Bad Idea. It should instead stream the file to disk.
def to_file(style = default_style)
  return @queued_for_write[style] if @queued_for_write[style]
  filename = path(style)
  extname  = File.extname(filename)
  basename = File.basename(filename, extname)
  file = Tempfile.new([basename, extname])
  file.binmode
  AWS::S3::S3Object.stream(path(style), bucket_name) do |chunk|
    file.write chunk
  end
  file.rewind
  return file
end

Closing comment (2011-06-24T03:53:40Z): This is a duplicate of #96. Let's continue our discussion there. I believe that there was an issue there about the error handling. Is that sill the case?
Repository: thoughtbot/paperclip

Issue #1950: Wrong dimensions saved when an image needs to be reoriented
Created: 2015-07-28T16:03:20Z
I have a photo model that uses paperclip to store its image. I'm storing the images with S3. In the convert options, I specify to auto-orient an image based on its exif. I use the after_post_process callback to run the "find dimensions" method which updates the models's image_width and image_height attributes.
The whole process works great normally, but in cases where an image is rotated, the find dimensions method call stores the incorrect dimensions (its original orientation not its rotated orientation). For example, an image with a portrait orientation in its exif but is uploaded as a landscape orientation will store the width as the longest side and the height as the smallest side, while being successfully rotated after the upload.
Is this a bug, or is there an issue with my configuration? I've been thinking it could be related to when the after_post_process callback happens... it seems like it happens before the file gets converted (and rotated).
  has_attached_file :image,
                      styles: { mini: '96x96>', small: '200x200>', product: '480x480>', large: '600x600>' },
                      default_style: :product,
                      preserve_files: "true",
                      storage: :s3,
                      s3_credentials: "#{Rails.root}/config/aws.yml",
                      bucket: 'BUCKET',
                      url: ':s3_path_url',
                      s3_protocol: :https,
                      path: ':id/:hash.:extension',
                      hash_secret: "SECRET",
                      convert_options: { all: '-strip -auto-orient -colorspace sRGB' }
    validates_attachment :image,
      :presence => true,
      :size => { :in => 0..ENV['max_image_size'].to_i.megabytes },
      :content_type => { :content_type => %w(image/jpeg image/jpg) }

# post process etc.
    after_post_process :find_dimensions

  def find_dimensions
      if errors.size == 0
        temporary = image.queued_for_write[:original]
        filename = temporary.path unless temporary.nil?
        filename = image.path(:original) if filename.blank?
        geometry = Paperclip::Geometry.from_file(filename)
        self.image_width  = geometry.width
        self.image_height = geometry.height
      end
  end

Duplicate issue #2035: Iphone portrait pictures are saved as landscape
Created: 2015-11-02T02:53:06Z
The : original picture is saved as landscape if it is in portrait mode. All other style pictures show up as portrait which is great, however , this issue messes up the dimensions when an image needs to be cropped.

Closing comment (2016-03-24T05:21:58Z): Thanks for reporting! Closing as duplicate of: #1950. Thanks!
Repository: thoughtbot/paperclip

Issue #1050: Custom path and custom URL
Created: 2012-10-16T13:03:16Z
hi i am having a doubt in changing the path for attached file i.e..,for uploading photos and files ..by default the path is  ":rails_root/public/system/" and i want to change the path as ~/apps/Blog/data/attached/
BLOG refers to my project app name
after making the changes the image or file i saving but it is not displaying in the browser
can any one help me out in  writing the correct PATH and URL
these are modified Path and Url
has_attached :photo,
path:  /apps/Blog/data/attached/:attachment/:id/:style/:filename",
url: //apps/Blog/data/attached/:attachment/:id/:style/:filename"
      thanks in advance who ever help me

Duplicate issue #1051: Custom path and custom URL
Created: 2012-10-16T13:03:16Z
hi i am having a doubt in changing the path for attached file i.e..,for uploading photos and files ..by default the path is  ":rails_root/public/system/" and i want to change the path as ~/apps/Blog/data/attached/
BLOG refers to my project app name
after making the changes the image or file i saving but it is not displaying in the browser
can any one help me out in  writing the correct PATH and URL
these are modified Path and Url
has_attached :photo,
path:  /apps/Blog/data/attached/:attachment/:id/:style/:filename",
url: //apps/Blog/data/attached/:attachment/:id/:style/:filename"
      thanks in advance who ever help me

Closing comment (2012-10-19T14:44:50Z): This is a duplicate of #1050.
Repository: thoughtbot/paperclip

Issue #1313: Emit more useful errors when a file cannot be identified as an image
Created: 2013-08-16T17:58:18Z
See #1299
When a file has passed validations but cannot correctly have its geometry read, it will cause paperclip to add a Paperclip::Errors::NotIdentifiedByImageMagickError error message. This is not a great error message - it should read something like "could not be identified as an image", which might be totally valid for PDFs, word docs, or other files that can't be processed through the default thumbnail processor.
Hook into rails i18n() and ensure that we keep the default "whiny" behavior, which silences certain imagemagick-related errors when encountered.

Duplicate issue #1223: Paperclip::NotIdentifiedByImageMagickError
Created: 2013-04-19T22:37:36Z
On my Rails/Spree application on an AWS development server, I'm getting:
Paperclip::NotIdentifiedByImageMagickError in Admin/imagesController#create when I try to upload product images.
Spree's issue tracker suggest this happens with Paperclip < 2.8. StackOverflow says I should update Paperclip.options[:command_path] to the value of which identify. On this tracker and Spree's people have said that's is due using the latest version of cocaine.
None of those solutions have worked and I'm not sure the best way to debug. I'm using Paperclip 2.8.0 and cocaine 0.3.1 (it also broke with 0.5.x).
There's been a lot of chatter about this problem, but I don't see a definitive answer. Would love to help however I can.

Closing comment (2015-05-29T02:20:42Z): Closing as duplicate of: #1313. We are busy right now, please send a PR if you have availability to solve this issue! Thank you, all.
Repository: thoughtbot/paperclip

Issue #2109: undefined method `cropping?'
Created: 2016-02-11T15:10:50Z
module Paperclip
  class Cropper < Thumbnail
    def transformation_command
      if crop_command
        crop_command + super.sub(/ -crop \S+/, '')
      else
        super
      end
    end

    def crop_command
      target = @attachment.instance
      if target.cropping?
        " -crop #{target.crop_w}x#{target.crop_h}+#{target.crop_x}+#{target.crop_y}"
      end
    end
  end
end
undefined method cropping?, no idea why :(

Duplicate issue #2110: undefined method `cropping?'
Created: 2016-02-11T15:11:31Z
module Paperclip
    class Cropper < Thumbnail
        def transformation_command
            if crop_command
                crop_command + super.sub(/ -crop \S+/, '')
            else
                super
            end
        end

        def crop_command
            target = @attachment.instance
            if target.cropping?
                " -crop #{target.crop_w}x#{target.crop_h}+#{target.crop_x}+#{target.crop_y}"
            end
        end
    end
end
undefined method `cropping?' ~
no idea why :(

Closing comment (2016-02-12T00:47:00Z): Duplicate of #2109.
Repository: thoughtbot/paperclip

Issue #1771: Content type validation works for 'image/*' but not for 'application/pdf'
Created: 2015-02-17T19:19:15Z
When I try to use the content type validation on non-image files, I am getting a validation failed error.  It seems that the validation code is getting a content type of "application/force-download".
When I run file -b on the file I get:
file -b --mime clinical\ research\ review\ algorithm_updated\ 120109.pdf
application/pdf; charset=binary
System details are as follows:
I am testing on a Mac with OS version 10.10.2
running the server locally  with:
WEBrick 1.3.1
ruby 2.1.5 (2014-11-13) [x86_64-darwin14.0]
Gemfile
ruby '2.1.5'
gem 'rails', '> 4.2.0'
gem "rmagick"
gem "paperclip", "> 4.2"
gem 'aws-sdk', '~> 1.5.7'
In my model:
has_attached_file :document
validates_attachment  :document,
:content_type => { :content_type => 'application/pdf' },
:size => { :in => 0..MAX_DOC_SIZE }
looking at the params for the create:
@content_type="application/force-download",
@headers="Content-Disposition: form-data; name="document_upload[document]"; filename="clinical research review algorithm_updated 120109.pdf"\r\nContent-Type: application/force-download\r\n">},
The fun this is that validation works for images.
Using the model code for images:
has_attached_file :image,
:styles => { :thumb => "100x100>" },
:convert_options => {
:medium => "-quality 80 -interlace Plane",
:thumb => "-quality 80 -interlace Plane"
}
validates_attachment :image,
:content_type => { :content_type => /\Aimage/.*\Z/ },
:size => { :in => 0..MAX_IMAGE_SIZE }
So for images all is working as expected.  However, for other content types it is not.
Any clues would be appreciated.
Regards,
-Ian

Duplicate issue #2029: Content Type Spoof for pdf on firefox
Created: 2015-10-19T10:47:00Z
In order to upload pdf from firefox I had to configure
Paperclip.options[:content_type_mappings] = { pdf: [ "application/pdf", "binary/octet-stream" ] }
since firefox sends binary/octet-stream in the header for pdf files.
This is probably an error in firefox but I don't understand why paperclip checks browser hearders in order to find spoofing.
Is not enought to check extension and the result of file --mime (which paperclib already does)?
Why consider a "spoofable" information from the client in order to find spoofing?

Closing comment (2016-05-09T21:23:39Z): Closing as duplicate of #1771. Thanks for your input.
Repository: thoughtbot/paperclip

Issue #1543: Devkit requirement undocumented
Created: 2014-05-08T08:13:00Z
I on Windows 7 and hadn't added my devkit to system PATH because the path is automagically enhanced when building gems. But lately I discovered that paperclip needs devkit binaries in order to work. Without devkit, I was getting this error while trying to upload an image file:
has an extension that does not match its contents

this is probably due to:
https://github.com/thoughtbot/paperclip/blob/master/lib/paperclip/media_type_spoof_detector.rb#L63
please do either of these:

Document devkit requirement, and it's addition to PATH, in readme.md in the Installation section.
Return better error if a required binary from devkit is not found, rather than the above misleading one.

Duplicate issue #1527: Completed 422 Unprocessable Entity
Created: 2014-04-29T12:39:38Z
I've follow the basic example in documentation and when the is being created..
Command :: file -b --mime-type "C:/Users/DAVID1.RAM/AppData/Local/Temp/0710942482dda3379232b32bf543d65320140429-7008-gdw55v"
[paperclip] Content Type Spoof: Filename gambling.png (["image/png"]), content type discovered from file command: . See documentation to allow this combination.
←[1m←[36m (2.0ms)←[0m  ←[1mBEGIN←[0m
Command :: file -b --mime-type "C:/Users/DAVID1.RAM/AppData/Local/Temp/864ec4332949bfc5c6013bd9f45d089120140429-7008-x8mll0"
[paperclip] Content Type Spoof: Filename gambling.png (["image/png"]), content type discovered from file command: . See documentation to allow this combination.
←[1m←[35m (2.0ms)←[0m  ROLLBACK
Completed 422 Unprocessable Entity in 134.0ms (Views: 1.0ms | ActiveRecord: 5.0ms)
any ideas?
my user model:
class User < ActiveRecord::Base
attr_accessible :avatar
has_attached_file :avatar, :styles => { :medium => "300x300>", :thumb => "100x100>" }, :default_url => "/images/:style/missing.png"
validates_attachment_content_type :avatar, :content_type => /\Aimage/.*\Z/
end
And controller:
def create
@user = User.create( params[:user] )
end
I don't know what is the problem..

Closing comment (2014-05-09T13:58:01Z): I think this is related to #1543 as you need file command to detect the file type. On Windows, I think this comes with RailsInstaller's Devkit.
I'm going to close this one. Let's track the progress on the other issue regarding better documentation.
Repository: thoughtbot/paperclip

Issue #1804: Reprocessing a single style re saves the original
Created: 2015-03-06T11:47:46Z
It appears that calling attachment.reproces(:my_style) re-saves the original image as well.
This results in an extra upload of the original file to S3 (if you use it), causing extra rountrip / delay (and potentially a new file if your interpolations include :updated_at.
In reality reprocessing a single style should not update the original record I believe, as that has not changed?
This is more apparent if you are using the :only_process option and delayed_paperclip with split processing, eg:
    has_attached_file :file,
                      storage: :s3,
                      styles: lambda { |_a| 
                                            {
                                              original: { geometry: "2880x2880>" },
                                              thumb: { geometry: "260x260#" }
                                            }                                            
                      processors: [:rotator, :thumbnail, :paperclip_optimizer],
                      only_process: [:original]

  process_in_background :file, only_process: [:thumb]

In the scenario above, I would expect:

paperclip to process the original on upload
delayed_paperclip to process :thumb asynchronously (we use sidekiq)

What happens is:

paperclip processes the original on upload - correct
delayed_paperclip calls attachment.reprocess!(:thumb) from a sidekiq job - correct
paperclip re-saves the original again and reprocesses the :thumb - incorrect, only the thumb should be saved / uploaded to S3

the culprit seems to be this bit of code:
https://github.com/thoughtbot/paperclip/blob/master/lib/paperclip/attachment.rb#L426
When calling reprocess! passing only certain styles, the original is still @queued_for_write.
I'm happy to try to open a PR for this, but I would like to know if you guys have any suggestion on how to approach this, shall we skip the following if :only_process does not include the original?
https://github.com/thoughtbot/paperclip/blob/master/lib/paperclip/attachment.rb#L107
https://github.com/thoughtbot/paperclip/blob/master/lib/paperclip/attachment.rb#L109
Any input is appreciated.

Duplicate issue #2039: Duplicate assets stored on S3 when calling reprocess!
Created: 2015-11-06T20:20:59Z
Using paperclip 4.3.1
My model has the following:
has_attached_file :avatar,
    styles: -> (attachment) { attachment.instance.avatar_styles },
    default_style: "128x128",
    default_url: -> (attachment) { attachment.instance.avatar_default_url },
    path: "u/:id_partition/:style_:hash.:extension",
    hash_data: ":attachment/:id/:style/:updated_at",
    hash_secret: "..."
When I call reprocess! a different hash is generated and the previously generated images are not removed.

Closing comment (2015-11-10T15:11:29Z): I believe this is a duplicate of #1804
Repository: thoughtbot/paperclip

Issue #2337: Rendering image urls is slow (200ms per url), why?
Created: 2016-11-11T11:43:05Z
I'm using Google Storage along with Paperclip.
Apparently Paperclip takes up to 200ms per image just to recreate the url.
How come? Is there anyway I can optimize it?
Here is my configuration:
# Gemfile
gem 'rails', '4.2.5'

gem 'fog-google', '~> 0.3.2'
gem 'google-api-client', '~> 0.8.6'
# config/application.rb
module Parasite
  class Application < Rails::Application

    config.paperclip_defaults = {
      storage: :fog,
      fog_credentials: {
        google_storage_access_key_id:     ENV['GOOGLE_STORAGE_ID'],
        google_storage_secret_access_key: ENV['GOOGLE_STORAGE_SECRET'],
        provider: 'Google'
      },
      fog_directory: ENV['GOOGLE_BUCKET']
      styles: { 
        medium: "600x600>", 
        thumb: "120x120>" 
      }, 
      default_url: "/images/lazy.png",
    }

  end
end
# app/model/admin/news_post.rb
class Admin::Post < ActiveRecord::Base
  has_attached_file :featured_image
  validates_attachment_content_type :featured_image, content_type: /\Aimage\/.*\Z/
end
And on the view:
<%= @myPosts.first.featured_image.url %>

On a local environment without this line rendering takes 6ms.
With this line it goes up to 209ms. If I add another one it goes up to 420ms!
I haven't measured in detail on production environment, but looking at New Relic I see up to 20sec on pages with images, therefore it's not something related to the environment.
What am I doing wrong?

Duplicate issue #2358: Fog storage / Google Cloud - request on every URL?
Created: 2016-12-07T02:54:21Z
I'm trying out the fog storage adapter with Google Cloud and there's two things that immediately stand out:

Every call to print an attachment URL sends a HTTP request to the Google API
If the key does not exist in the Google Cloud bucket, rather than display the "missing" image, it throws an Exconn exception because the expected response code is 200 and what it got was 404.

I'm trying to switch away from the S3 storage type so this behaviour is really weird. Can anyone provide any guidance on this?

Closing comment (2016-12-07T19:04:35Z): The first issue seems be related to #2337.
Try setting the fog_host option, and see if the extra network request goes away. It may also help with the second issue.
Let me know if that helps.
Repository: thunderclient/thunder-client-support

Issue #84: Cannot import `swagger.json` / OpenAPI
Created: 2021-04-29T10:29:11Z
Describe the bug
I tried importing swagger.json which is an auto-generated file if you are using https://swagger.io/ and describes the API in a single JSON file. I get a generic error:

Failed to import

To Reproduce

Download a sample swagger.json here: https://petstore.swagger.io/v2/swagger.json (or generate one yourself)
Import the file using ThunderClient in VSCode
See the generic error at the bottom left


Expected behavior
The swagger.json is successfully imported and the described API available as a Collection in VSCode/ThunderClient
Platform:

OS: macOS Big Sur 11.3

Solution:

Duplicate issue #350: OpenAPI support
Created: 2021-10-04T14:55:36Z
Hi, I just made some tests to use this amazing extension in real world projects and  was partially KO since all our REST documentation is based on openAPI, with a specs.yml file, which is not supported at the moment in collection / import
To by-pass, I should load the specs.yml collection into postman and from there export it again as json, which is a huge problem for dev-teams flow, since specs.yml is into repository and became updated eventually, while the json format not.
Anyways, it's a very amazing extension and I really enjoy it. Nice work!

Closing comment (2022-01-15T21:04:38Z): I am closing this issue, as it's duplicate of #84
Repository: thunderclient/thunder-client-support

Issue #99: Split request/result views vertically
Created: 2021-05-01T10:41:52Z
Is your feature request related to a problem? Please describe.
Nope
Describe the solution you'd like
When having editors side by side it would be better screen estate wise to split the request/response views vertically.
So instead of...

Something like...

Duplicate issue #169: [feature request] Supporting up-down layout 
Created: 2021-05-21T02:15:06Z
Hey guys, I hope this great tool can support up-down layout.
Since I used to split my vscode into left-right views,
I found that using the thunder-client in one view can be a litte narrow to display
Specially for the url input, when the url is really long

Closing comment (2021-05-21T02:30:22Z): Hi @caperso duplicate of #99
Repository: thunderclient/thunder-client-support

Issue #38: Allow Environments to inherit from others (prevents variable re definition)
Created: 2021-04-24T13:17:33Z
Is your feature request related to a problem? Please describe.
As a user I don't want to re-define common variables on each of the environments
Describe the solution you'd like
Envirnoment inheritance/extension something like nested folders for environment with a hierarchy so that variable definitions can be reused.
Describe alternatives you've considered
Copy/pasting variables in all Environments, it gets hard when you need to make changes to them, specifically if you have many Environments
Implementation:
Postman handles this by means of Workspaces and Global variables. I don't find that a good solution. Because it doesn't allow for multiple nesting of environments (just one Global variables section) nor does make much sense to me. I'd rather have inheritance.

Duplicate issue #221: Environment inheritance
Created: 2021-06-23T13:02:13Z
I would like to be able to inherit environment variables into a new sub-environment.
Perhaps we can select an existing environment as "parent".
All variables from the parent are inherited by the child.  Any identical variables defined in the child override the parent.
If a child environment defines a variable using {{replacement}} tokens, these should resolve whether they exist in the parent or child.
Otherwise.. I have to duplicate environments, and then have a maintenance issue when I need to update a common variable.

Closing comment (2021-06-24T04:52:29Z): duplicate of #38
Repository: thunderclient/thunder-client-support

Issue #577: Allow to hide ".sec-line" divs (last usage time) via extension settings
Created: 2022-04-28T08:20:21Z
A problem is that every line in requests list takes up too much space on screen. In postman, for example, they are much more condensed.
A solution I want to ask for is to add a checkbox in Extension Settings called something like Compact mode, which will hide divs with class ".sec-line" in requests list and maybe reduce padding
An alternative solution I use now is applying custom CSS via dev tools, but this is clearly not very comfortable.

Duplicate issue #729: Let me hide the request timestamp
Created: 2022-08-18T20:33:42Z
Is your feature request related to a problem? Please describe.
The x mins/hours/etc. ago line in the request list is just noise to me and ends up adding a scroll bar to the tree.

Describe the solution you'd like
I'd love the ability to hide it, could there be a setting for this?

Closing comment (2022-08-19T03:11:15Z): Duplicate of #577