Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F9583859
file-reference.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
577 B
Referenced Files
None
Subscribers
None
file-reference.js
View Options
module
.
exports
=
function
(
app
)
{
return
{
name
:
"file_reference"
,
is_proper_value
:
function
(
context
,
params
,
value
)
{
return
app
.
Datastore
.
find
(
"files"
,
{
id
:
value
}).
then
(
function
(
results
)
{
if
(
results
.
length
===
0
)
{
return
Promise
.
reject
(
"Bad file id: "
+
value
);
}
else
{
return
Promise
.
resolve
();
}
});
},
format
:
function
(
context
,
params
,
file_id
,
format
)
{
if
(
format
===
"internal"
)
{
return
app
.
Datastore
.
find
(
"files"
,
{
id
:
file_id
}).
then
(
a
=>
a
[
0
]
);
}
else
{
return
file_id
;
}
},
};
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 11, 10:59 (18 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
984250
Default Alt Text
file-reference.js (577 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment