Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. <a href={this.getDownloadURL(note.noteId)}>
  2. <span className="downloadAction">
  3. DOWNLOAD
  4. <img className="logoImageRight" src={require("../imgs/download.png")} alt="NotFound"/>
  5. </span>
  6. </a>
  7.  
  8. async getDownloadURL(noteId){
  9. var attachmentURL;
  10. const note = await this.getNote(noteId);
  11. const {attachment} = note;
  12.  
  13. if(attachment){
  14. attachmentURL = await Storage.vault.get(attachment);
  15. }
  16. return(attachmentURL);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement