Browse Source

Forgot to send token on upload

pitu 8 năm trước cách đây
mục cha
commit
d0b5d4a2df
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      public/js/upload.js

+ 4 - 1
public/js/upload.js

@@ -29,7 +29,10 @@ window.onload = function () {
 			previewTemplate: previewTemplate,
 			createImageThumbnails: false,
 			maxFiles: 1000,
-			autoProcessQueue: true
+			autoProcessQueue: true,
+			headers: {
+        		'auth': localStorage.token
+    		}
 		});
 
 		// Update the total progress bar