Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F325742
attachment_setting.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
attachment_setting.js
View Options
import
Setting
from
'./setting.js'
import
{
fileTypeExt
}
from
'src/services/file_type/file_type.service.js'
import
MediaUpload
from
'src/components/media_upload/media_upload.vue'
import
Attachment
from
'src/components/attachment/attachment.vue'
export
default
{
...
Setting
,
props
:
{
...
Setting
.
props
,
compact
:
Boolean
,
acceptTypes
:
{
type
:
String
,
required
:
false
,
default
:
'image/*'
}
},
components
:
{
...
Setting
.
components
,
MediaUpload
,
Attachment
},
computed
:
{
...
Setting
.
computed
,
attachment
()
{
const
path
=
this
.
realDraftMode
?
this
.
draft
:
this
.
state
// The "server" part is primarily for local dev, but could be useful for alt-domain or multiuser usage.
const
url
=
path
.
includes
(
'://'
)
?
path
:
this
.
$store
.
state
.
instance
.
server
+
path
return
{
mimetype
:
fileTypeExt
(
url
),
url
}
}
},
methods
:
{
...
Setting
.
methods
,
setMediaFile
(
fileInfo
)
{
if
(
this
.
realDraftMode
)
{
this
.
draft
=
fileInfo
.
url
}
else
{
this
.
configSink
(
this
.
path
,
fileInfo
.
url
)
}
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 24, 4:22 AM (1 d, 15 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
98672
Default Alt Text
attachment_setting.js (1 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline
Log In to Comment