File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @secjs/utils" ,
3- "version" : " 1.9.1 " ,
3+ "version" : " 1.9.2 " ,
44 "description" : " Utils functions and classes for Node.js" ,
55 "license" : " MIT" ,
66 "author" : " João Lenon <lenon@athenna.io>" ,
Original file line number Diff line number Diff line change @@ -23,15 +23,16 @@ import {
2323} from 'node:fs'
2424
2525import { lookup } from 'mime-types'
26+ import { pathToFileURL } from 'node:url'
2627import { randomBytes } from 'node:crypto'
2728import { isAbsolute , parse , sep } from 'node:path'
2829
30+ import { Path } from '#src/Helpers/Path'
2931import { Json } from '#src/Helpers/Json'
3032import { Debug } from '#src/Helpers/Debug'
3133import { Parser } from '#src/Helpers/Parser'
3234import { Options } from '#src/Helpers/Options'
3335import { NotFoundFileException } from '#src/Exceptions/NotFoundFileException'
34- import { Path } from '#src/Helpers/Path'
3536
3637export class File {
3738 /**
@@ -238,6 +239,7 @@ export class File {
238239 name : this . name ,
239240 base : this . base ,
240241 path : this . path ,
242+ href : this . href ,
241243 mime : this . mime ,
242244 createdAt : this . createdAt ,
243245 accessedAt : this . accessedAt ,
@@ -682,6 +684,7 @@ export class File {
682684 this . name = buffer . toString ( 'base64' ) . replace ( / [ ^ a - z A - Z 0 - 9 ] / g, '' )
683685 this . base = this . name + this . extension
684686 this . path = this . dir + '/' + this . base
687+ this . href = pathToFileURL ( this . path ) . href
685688
686689 return
687690 }
Original file line number Diff line number Diff line change @@ -170,6 +170,8 @@ export declare class File {
170170 public base : string
171171
172172 public path : string
173+
174+ public href : string
173175
174176 public isCopy : boolean
175177
You can’t perform that action at this time.
0 commit comments