@@ -42,7 +42,7 @@ const fs = require('fs');
4242 };
4343
4444 // Upload the file
45- const uploadResponse = await axios .post (` ${ baseURL} /api/v1/db /storage/upload` , formData, {
45+ const uploadResponse = await axios .post (` ${ baseURL} /api/v2 /storage/upload` , formData, {
4646 headers: uploadHeaders,
4747 });
4848
@@ -80,7 +80,7 @@ TITLE_VALUE="New Name" # Optional: text value
8080
8181# Step 1: Upload the file
8282echo " Uploading file..."
83- UPLOAD_RESPONSE=$( curl -s -X POST " ${BASE_URL} /api/v1/db /storage/upload" \
83+ UPLOAD_RESPONSE=$( curl -s -X POST " ${BASE_URL} /api/v2 /storage/upload" \
8484 -H " xc-token: ${API_TOKEN} " \
8585 -F " file=@${FILE_PATH} " )
8686
@@ -144,7 +144,7 @@ const uploadAndInsert = async (): Promise<void> => {
144144 };
145145
146146 try {
147- const uploadResponse = await axios .post (` ${baseURL }/api/v1/db /storage/upload ` , formData , {
147+ const uploadResponse = await axios .post (` ${baseURL }/api/v2 /storage/upload ` , formData , {
148148 headers: uploadHeaders ,
149149 });
150150
@@ -213,7 +213,7 @@ with open(FILE_PATH, 'rb') as file:
213213
214214 print (" Uploading file..." )
215215 upload_response = requests.post(
216- f " { BASE_URL } /api/v1/db /storage/upload " ,
216+ f " { BASE_URL } /api/v2 /storage/upload " ,
217217 headers = headers,
218218 files = files
219219 )
@@ -273,7 +273,7 @@ TABLE_ID = 'YOUR_TABLE_ID'
273273FILE_PATH = ' ./photo.png'
274274
275275# Step 1: Upload the file
276- uri = URI (" #{ BASE_URL } /api/v1/db /storage/upload" )
276+ uri = URI (" #{ BASE_URL } /api/v2 /storage/upload" )
277277
278278file = File .open (FILE_PATH )
279279mime_type = MIME ::Types .type_for(FILE_PATH ).first.to_s
@@ -368,7 +368,7 @@ public class NocoDBUploaderOkHttp {
368368 .build();
369369
370370 Request uploadRequest = new Request .Builder ()
371- .url(BASE_URL + " /api/v1/db /storage/upload" )
371+ .url(BASE_URL + " /api/v2 /storage/upload" )
372372 .header(" xc-token" , API_TOKEN )
373373 .post(multipartBody)
374374 .build();
@@ -450,7 +450,7 @@ const path = require('path');
450450 };
451451
452452 try {
453- const uploadResponse = await axios .post (` ${ baseURL} /api/v1/db /storage/upload` , formData, {
453+ const uploadResponse = await axios .post (` ${ baseURL} /api/v2 /storage/upload` , formData, {
454454 headers: uploadHeaders,
455455 });
456456
0 commit comments