Skip to content

Commit

Permalink
Half done settings image uploader
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincharles committed Mar 17, 2023
1 parent ae86e01 commit 908433c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/Tools/_framework/Paths/PortfolioActivitySettings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,6 @@ export function PortfolioActivitySettings(){
// console.log("image",image)
// console.log("base64Image",base64Image)

let initialFileInfo = {fileName:file.name,size:file.size,progressPercent:0}
setUploadProgress((was)=>[...was,initialFileInfo])



//Upload files
Expand All @@ -180,7 +177,6 @@ export function PortfolioActivitySettings(){

//uploads are finished clear it out
numberOfFilesUploading.current = 0;
setUploadProgress([]);
let {success, cid} = data;

if (success){
Expand Down Expand Up @@ -222,7 +218,13 @@ export function PortfolioActivitySettings(){
</Td></>
)}
</tr> */}
<tr>
<tr key="drop" {...getRootProps()} >
<Td colSpan={2}>
<input {...getInputProps()} />
{isDragActive ? <p>Drop here to upload</p> : <p>Preview of Image</p> }
</Td>
</tr>
{/* <tr>
<Td><SideBySide>Image <Button value="Upload" onClick={() => alert('upload')}/></SideBySide>
<div>Upload will be resized</div>
<div>max width 238px, max height 122 px</div>
Expand All @@ -237,7 +239,7 @@ export function PortfolioActivitySettings(){
)}
</div>
</Td>
</tr>
</tr> */}
{/* <input name="imagePath" style={{width:"390px"}} type="text" placeholder='This will be an image preview' defaultValue={data.imagePath}/> */}
<tr>
<Td>Activity Label</Td>
Expand Down
1 change: 1 addition & 0 deletions src/Tools/_framework/Paths/SiteHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export async function loader(){
if (signedIn){
//Check on portfolio courseId
const response = await fetch('/api/getPorfolioCourseId.php');

const data = await response.json();
portfolioCourseId = data.portfolioCourseId;
if (data.portfolioCourseId == ""){
Expand Down

0 comments on commit 908433c

Please sign in to comment.