Skip to content

Instantly share code, notes, and snippets.

@Jerga99
Created July 17, 2018 22:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Jerga99/7fe7b1942c6e5bbe4723f2369c760649 to your computer and use it in GitHub Desktop.
Save Jerga99/7fe7b1942c6e5bbe4723f2369c760649 to your computer and use it in GitHub Desktop.
input {
display: none;
}
.image-upload-container {
cursor: pointer;
}
.img-preview-container {
background-color: #f7f7f7;
position: relative;
.img-preview {
background: center center no-repeat;
background-size: contain;
height: 116px;
width: 116px;
&-error {
display: none;
}
}
}
.img-loading-overlay {
background-color: black;
bottom: 0;
left: 0;
opacity: .2;
position: absolute;
right: 0;
top: 0;
}
.img-spinning-circle {
display: inline-block;
width: 64px;
height: 64px;
margin: auto;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
.img-spinning-circle:after {
content: " ";
display: block;
width: 46px;
height: 46px;
margin: 1px;
border-radius: 50%;
border: 5px solid #fff;
border-color: #fff transparent #fff transparent;
animation: lds-dual-ring 1.2s linear infinite;
}
@keyframes lds-dual-ring {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.btn-bwm {
background-color: $main-color;
border-color: $main-color;
color: white;
padding: 15px 30px;
font-size: 20px;
&:hover, &:focus, &:active {
border-color: $main-color !important;
background-color: $main-color !important;
}
}
@ziv-caspi
Copy link

Hi! so I followed your angular image upload tutorial and copied pasted the styles from here, without fully checking them (I know...). line 2: input { display: none } made every other input on page non working (input applies to all other inputs as well), and I forgot I pasted this so I spent way too long a time trying to figure out why inputs just no longer work :), So If you could change that input to a specific ID that only affects our input tag I think that would be better for future developers. Thanks for the help!

@SafNaaz
Copy link

SafNaaz commented Jan 14, 2021

Hi, Once upload fails with any reason. second time upload is not triggered. Pls update your code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment