File tree 1 file changed +0
-17
lines changed
1 file changed +0
-17
lines changed Original file line number Diff line number Diff line change @@ -33,13 +33,6 @@ export const handler: Handlers = {
33
33
async PUT ( req , ctx ) {
34
34
try {
35
35
const filename = ctx . params . filename
36
-
37
- if ( ! filename . endsWith ( '.enc' ) ) {
38
- return new Response ( 'Only encrypted files (.enc) are accepted' , {
39
- status : 400 ,
40
- } )
41
- }
42
-
43
36
const size = req . headers . get ( 'content-length' )
44
37
if ( ! size || parseInt ( size ) > MAX_FILE_SIZE ) {
45
38
return new Response (
@@ -109,12 +102,6 @@ export const handler: Handlers = {
109
102
try {
110
103
const filename = ctx . params . filename
111
104
112
- if ( ! filename . endsWith ( '.enc' ) ) {
113
- return new Response ( 'Only encrypted files (.enc) are allowed' , {
114
- status : 400 ,
115
- } )
116
- }
117
-
118
105
// Get file hash from the start of the filename
119
106
const fileHash = filename . slice ( 0 , 64 ) // SHA-256 hash is 64 hex chars
120
107
@@ -150,10 +137,6 @@ export const handler: Handlers = {
150
137
async DELETE ( req , ctx ) {
151
138
try {
152
139
const filename = ctx . params . filename
153
- if ( ! filename . endsWith ( '.enc' ) ) {
154
- return new Response ( 'Invalid file type' , { status : 400 } )
155
- }
156
-
157
140
const fileHash = filename . slice ( 0 , 64 )
158
141
159
142
const authHeader = req . headers . get ( 'Authorization' )
You can’t perform that action at this time.
0 commit comments